Commit Graph

79 Commits

Author SHA1 Message Date
Michael Davidsaver e298fb4c27 dbStatic: avoid write past end of DBENTRY::message
Prevent long link strings (and maybe others)
from overflowing the fixed length string
buffer associated with each DBENTRY.
2015-12-21 18:56:39 -05:00
Andrew Johnson 405f50533e Fix for linux-x86 2015-09-10 09:56:50 -05:00
Andrew Johnson 66e126bae8 Merged Micheal's lockopt branch 2015-09-06 23:15:21 -05:00
Andrew Johnson d49fc94314 Merge changes from 3.15 branch, to revno 12701 2015-08-20 11:24:07 -05:00
Andrew Johnson 88864e949b Merge changes from 3.14 branch, to revno 12599 2015-08-20 11:14:01 -05:00
Andrew Johnson 50e6a305b1 Merged changes from 3.15 branch to revno 12689 2015-07-13 13:42:10 -05:00
Andrew Johnson 5eb49ebaf0 Merged changes from 3.14 branch to revno 12590 2015-07-13 13:05:33 -05:00
Andrew Johnson fa1ddeeb1b Removed the last vestiges of RSET::get_value() 2015-06-23 18:04:33 -05:00
Andrew Johnson 961dc450c4 Merged changes from 3.15 branch up to Revno 12686 2015-06-05 13:48:57 -05:00
Ralph Lange fbd2d4dd31 dbStatic: fix buffer overrun in printing functions by extending the local buffer accordingly 2015-06-05 11:10:10 +02:00
Andrew Johnson fa23ba8a6a Merged changes from 3.15 branch up to revno 12670 2015-04-16 18:12:59 -05:00
Ralph Lange 09fab352b0 dbstatic: raise link field length limit to 256 by bumping internal buffer size 2015-04-13 17:13:09 +02:00
Michael Davidsaver ad6f55d92f dbStatic: always clear parser tempList
Warn if tempList is not empty when it should be
2015-04-08 18:37:12 -04:00
Michael Davidsaver e852de64ff dbStatic: fix leak in parser
"% cdef" not free'd
2015-04-02 18:58:15 -04:00
Michael Davidsaver 8ce0ba1e54 dbLink: backward link tracking 2015-03-24 14:18:11 -04:00
Michael Davidsaver adcde46e9e populate RDES early 2015-03-24 14:12:00 -04:00
Andrew Johnson 8344b4ed79 Merged changes from 3.15 up to revno 12658 2015-03-18 17:01:34 -05:00
Andrew Johnson 1fd91f52e2 dbStatic: Add field type lookup routines 2015-03-18 16:34:07 -05:00
Michael Davidsaver 8bf765365f std/rec/test: add asTest to RTEMS test harness 2015-03-17 15:26:08 -04:00
Michael Davidsaver e7037cc519 dbStatic: fix CONSTANT links
constantStr==NULL and constantStr=="" have different
meanings for recGblInitConstantLink() which is used with DOL.
constantStr should remain NULL unless explicitly set
by either initial("") or field(..., "")
2015-03-17 11:34:36 -04:00
Andrew Johnson cc3a01d460 Merged changes from 3.15 branch up to revno 12655 2015-03-11 17:20:40 -05:00
Andrew Johnson 02a105e5ab Merged changes from 3.14 branch up to revno 12540 2015-03-02 11:43:20 -06:00
Andrew Johnson e8c9783e06 Merged changes from 3.14 branch up to revno 12530 2015-03-02 10:35:35 -06:00
Andrew Johnson 92b4d8e48d Merged changes from 3.14 branch up to revno 12526 2015-02-27 18:11:37 -06:00
Andrew Johnson a7ad9a1256 Merged Michael's link-parsing branch 2015-02-03 00:38:23 -06:00
Michael Davidsaver 85e21863dc dbStaticLib: set pdbbase=NULL after freeing 2015-01-05 17:43:17 -05:00
Andrew Johnson b74eb61949 Merged dbca-test branch 2014-10-06 18:04:33 -05:00
Andrew Johnson 9cebc2993b Fix epicsExportSharedSymbols for MinGW build
Include files now in sorted order within each block.
2014-10-06 00:57:02 -05:00
Michael Davidsaver 5847f98f89 oops 2014-08-01 13:55:33 -04:00
Michael Davidsaver 5a8915c051 INST_IO no longer accept invalid string as empty 2014-08-01 11:28:10 -04:00
Michael Davidsaver 33804bd7ea iocInit: initialize links in iocBuild
Done before any driver, record, or device supports run.
Also before the hooks used by autosave.
2014-08-01 11:28:10 -04:00
Michael Davidsaver 200355bc00 dbStatic: re-write dbPutString() to use new link parsing
dbPutString() now has two behaviors.  If link_type==CONSTANT
and constantStr==NULL, the link has not yet been initialized.
Just set the ->text field.

If the link has been initialized, then use dbSetLink() to
make the assignment.

Eliminate special handling for DBF_DEVICE.
2014-08-01 11:28:10 -04:00
Michael Davidsaver 470a9f9fc9 Introduce struct dbLinkInfo and dbParseLink()
This structure holds the processed form of any link type.
It is populated by dbParseLink(), which can be called w/o
record locking.

dbCanSetLink() checks the the parsed link, and a DBLINK field
have compatible types for assignment.
Record locking is required, but this does not modify the field.

dbSetLink() makes the actual assignment.
2014-08-01 11:28:10 -04:00
Michael Davidsaver 8c60e7e2cb track INP/OUT field in struct dbFldDes
avoid string comparisons
2014-08-01 11:28:10 -04:00
Michael Davidsaver 40838579af iocShutdown: cleanup links 2014-07-31 16:22:01 -04:00
Michael Davidsaver 29490f24c7 dbFreeLinkContents: missing case for RF_IO 2014-07-31 16:22:01 -04:00
Andrew Johnson ee40ee789c dbStatic: Allow empty recordtype bodies in DBD files
A record type with an empty body is a declaration. The IOC will
accept one of these in a DBD file as long as it has already
loaded the full record type definition.
This will allow device support to provide a DBD file that declares
each record type it uses before giving the related device() entry.
Later commits will explain why.
2014-07-27 23:26:01 -05:00
Andrew Johnson c710a3a898 dbStatic/dbLexRoutines.c fix error message 2014-07-27 15:41:49 -05:00
Andrew Johnson c91fe7b7d7 Fix issues found by Clang
These were int => size_t changes that shouldn't have been made
because the value of the variable can be negative.
2014-07-12 01:09:36 -05:00
Andrew Johnson 3cf2d9057f Allow appended .db files to omit record type
This .db file syntax is now legal, provided the
named record already exists:

  record("*", "named") {
    field(VAL, 10)
  }
2014-06-12 14:47:42 -05:00
Ralph Lange 41bd895cd5 ioc: Fix more MSVC 12.0 warnings 2014-06-04 21:18:43 +02:00
Ralph Lange 32c2775940 ioc/dbStatic: fix bug introduced in revision 12486 2014-06-04 17:07:16 +02:00
Ralph Lange 5754dc136e src/ioc: fix numerous warnings appearing on MSVC 12.0 / Windows (64bit) 2014-06-04 15:56:51 +02:00
Ralph Lange 271e1811e3 ioc/dbStatic: make offset in field description an unsigned short, add cast to code generator
fixes ~2600 compiler warnings (on windows-x64)
2014-05-22 16:18:02 +02:00
Andrew Johnson e1e389a2dd Low-memory behaviour fixes.
Fix unchecked buffer allocation in dbChannel.c
Replace calls to epicsStrDup() with checked malloc() for
things that happen often after iocInit.

Michael Davidsaver pointed out this issue.
2014-02-07 17:19:28 -06:00
Andrew Johnson 3f0e633fd1 dbStatic: Clean up warning on darwin 2013-12-20 09:59:49 -06:00
Andrew Johnson 0a2020e2fc Merged changes from 3.14 branch
Up to 3.14.12.4 release.
2013-12-17 12:54:04 -06:00
Andrew Johnson 052f0992d2 dbStatic: Add property metadata to dump outputs
Both dbWriteRecordTypeFP() and dbDumpField() now show the
value of the prop() field attribute.
2013-11-06 09:28:49 -06:00
Michael Davidsaver 034388f009 recognize and store field attribute "prop()" 2013-11-04 13:39:16 -05:00
Michael Davidsaver 3d8bf34177 fix indent 2013-11-04 13:39:12 -05:00