8fc851b338
Write out global symbols to the debug file. Added some fixes for unusual situations (extern symbols without attached import, because the import wasn't referenced and therefore removed by the assembler).
uz
2011-08-31 20:48:40 +00:00
f204ec956a
Parse csym lines in the debug info file. No api functions til now.
uz
2011-08-30 13:19:28 +00:00
1157cff1bd
Validate the type passed in .dbg statements at least loosely.
uz
2011-08-30 13:18:50 +00:00
b4afe56ef1
For now use the void type for all debug symbols to avoid errors in the backends.
uz
2011-08-30 13:09:34 +00:00
2438497e9f
Shorten "extern" -> "ext".
uz
2011-08-30 13:04:08 +00:00
aaa21c6417
More work on high level language debug symbols. They are now passed correctly via the object files to the linker and written to the debug info file.
uz
2011-08-30 11:42:26 +00:00
2f82cb4fb8
The geos resource compiler was still called by its old name (Greg King).
uz
2011-08-30 09:38:53 +00:00
060cfe66e0
Renamed hldbgsym -> hlldbgsym.
uz
2011-08-29 20:37:28 +00:00
c2bf1b9ba4
Some code cleanup.
uz
2011-08-29 20:30:57 +00:00
eee6068029
Write the high level debug info to the object file.
uz
2011-08-29 20:02:06 +00:00
314476de27
Added an offset field to the high level language symbol definition.
uz
2011-08-29 18:55:29 +00:00
305cf64d40
Worked on high level language symbol info.
uz
2011-08-29 18:55:03 +00:00
2e7afb6a8d
Added a module for high level language debug symbols.
uz
2011-08-28 20:01:51 +00:00
548a29e076
Added output of types.
uz
2011-08-28 15:10:43 +00:00
534c630a23
Fixed the layout for the span output.
uz
2011-08-28 14:44:41 +00:00
12035b910e
Added span output.
uz
2011-08-26 20:03:11 +00:00
6b8efa8e9b
Add a (currently empty) type string to the debug info for symbols and functions.
uz
2011-08-26 13:01:29 +00:00
2fbebd25cf
Started to add debug infos for C functions and symbols.
uz
2011-08-26 12:05:00 +00:00
c2d859b9f3
Fix a C89 incompatibility (Stefan Haubenthal).
uz
2011-08-26 10:05:28 +00:00
7c96984473
Pointers passed outside the module should be const.
uz
2011-08-26 10:05:08 +00:00
557b077530
Added code to parse type strings and convert them into a set of cc65_typedata structures. Added cc65_type_byid and cc65_free_typedata (a dummy).
uz
2011-08-25 18:59:25 +00:00
3e84a2bd93
Fix type string for .ADDR and .FARADDR.
uz
2011-08-23 18:05:31 +00:00
262ed5db8b
Fixed a bug: Never remember a pointer to a string buffer, since it becomes invalid when the string buffer gets resized.
uz
2011-08-23 18:04:25 +00:00
d225866449
Renamed GT_GetArraySize to GT_GetElementCount.
uz
2011-08-23 18:01:23 +00:00
25171465d3
Implement variable sized element count for arrays.
uz
2011-08-23 16:15:41 +00:00
1e0ab407cd
Added the LineInfo count to the info line of the debug info file. This allows the debug info module to reduce memory usage.
uz
2011-08-22 21:52:40 +00:00
3b61ee2f5a
Track types, parse the extended debug info format with "type" lines.
uz
2011-08-22 19:37:10 +00:00
374b106b06
Maintain the types as separate indexed items in the debug info file.
uz
2011-08-22 18:22:45 +00:00
b064002266
Added a tpool module that implements a global pool for generic types, so we can merge duplicate ones and assign them global ids.
uz
2011-08-22 17:53:00 +00:00
fda7934e68
Do not resolve the lists of spans for LineInfos and Scopes, but keep them as ids. This way, we can delay loading spans until we know that we definitely need an object file. Did some restructuring for writing of span lists to the debug info file.
uz
2011-08-22 17:36:19 +00:00
ecfba0c9b0
Fix a problem with the generated array sizes for span types (they were wrong). As an optimization, don't create an array for just a few elements.
uz
2011-08-21 20:50:39 +00:00
4e43a293c6
Parse (but ignore) type information for spans.
uz
2011-08-21 20:18:27 +00:00
660df16d08
Write out type information for spans to the debug info file.
uz
2011-08-21 20:18:09 +00:00
b88dc209fc
Change prototype for GT_AsString to make it easier usable.
uz
2011-08-21 20:17:43 +00:00
6e47980eb7
Generate span types for .ADDR, .BYTE, .DBYT, .FARADDR and .WORD.
uz
2011-08-21 20:17:22 +00:00
6583320b79
Added GT_AsString().
uz
2011-08-21 20:04:27 +00:00
cc486bb4f5
Don't remember types for spans if no debug info is requested.
uz
2011-08-21 19:46:47 +00:00
913db79017
Add an optional type to a span.
uz
2011-08-21 19:44:02 +00:00
f2de523b5d
The string with index zero is the first string in the string pool.
uz
2011-08-21 19:35:51 +00:00
ac2b837285
Some work on the generic type module.
uz
2011-08-21 19:27:03 +00:00
358ccf236e
Write spans out in a separate object file section. This allows to merge duplicate spans in an object file and more extensions to come.
uz
2011-08-21 19:08:23 +00:00
37ac033370
Added CollReplaceExpand.
uz
2011-08-21 17:30:25 +00:00
d0d550be66
Fix errors in tracking the number of items in the table. Added function HT_GetCount to retrieve the number of items.
uz
2011-08-21 16:56:40 +00:00
ae98f4bcd8
Fix a problem with macro expansion count in line infos for macros.
uz
2011-08-21 16:23:38 +00:00
6cdac5eb4c
Fixed a bug in SP_Add.
uz
2011-08-21 16:08:52 +00:00
7fe0958b91
The ...Entry functions from the hashtab module have been renamed.
uz
2011-08-21 13:35:36 +00:00
58ffb47250
The ..Entry functions from the hashtable module have been renamed.
uz
2011-08-21 13:33:06 +00:00
96ce71ad5f
Removed the functions that work on HashNodes since they are mostly useless now.
uz
2011-08-21 13:31:30 +00:00
77110021ab
Implementation of StringPool has changed.
uz
2011-08-21 13:21:11 +00:00
4461988fd1
Implementation of SP_GetCount has been missing.
uz
2011-08-21 13:20:48 +00:00
bf889a1928
Implementation of StringPool has changed.
uz
2011-08-21 13:16:14 +00:00
e1a861f0a5
Use the hashtab to implement the string pool hash table.
uz
2011-08-21 13:15:52 +00:00
f3b49b57bd
Add a gentype.c module that contains GT_FromStrBuf.
uz
2011-08-20 22:13:58 +00:00
85584fb404
Small change for better hash table distribution.
uz
2011-08-20 21:53:22 +00:00
ef412bc22c
Added a new gentype module for generic (not language dependent) types.
uz
2011-08-20 20:16:13 +00:00
78551ba832
Read segment sizes as var, no longer as 32 bit values.
uz
2011-08-19 20:58:14 +00:00
6a01a3407a
Read the segment size as var, not as 32 bit value.
uz
2011-08-19 20:56:44 +00:00
1e20489ee1
Renamed some stuff. Write out the segment size as var, not 32 bit.
uz
2011-08-19 20:55:48 +00:00
607aa871e6
Last fix was wrong. The problem wasn't in the struct code but in SymLeaveLevel calling CloseSpans, which does not only close spans but might also add some, in which case the scope became another size.
uz
2011-08-19 15:24:11 +00:00
ce85b303c3
Fixed a bug: The size of a scope is now recorded for all scopes in SymLeaveLevel. Doing so also in the code for .STRUCT/.UNION will try to enter the .size symbol twice.
uz
2011-08-19 15:06:51 +00:00
7ee90fb21b
Added cc65_line_byspan and cc65_scope_byspan.
uz
2011-08-19 14:39:11 +00:00
7fa197337b
Add the number of attached lines and scopes to a span.
uz
2011-08-19 14:31:03 +00:00
bc0f3fd99b
Removed some debug output.
uz
2011-08-19 11:30:31 +00:00
61f3e1dce3
Allow more space for symbol names.
uz
2011-08-19 11:22:36 +00:00
aff6d02c43
Remove CollConstAt. Let CollAt and CollAtUnchecked take const pointers to collections. Use const pointers in many places. Some other cleanups.
uz
2011-08-19 11:21:22 +00:00
88774521a3
Use CollTransfer where possible.
uz
2011-08-19 11:06:52 +00:00
189a9bfb38
New function CollTransfer. Change CollAt and CollAtUnchecked to take a const Collection pointer instead of just a Collection pointer. This makes more sense, since the functions do not change the collection.
uz
2011-08-19 11:01:01 +00:00
307b8d88c3
Reenable optimizations.
uz
2011-08-19 10:46:49 +00:00
68db31c53b
Changed data type used to store line numbers from unsigned long to unsigned.
uz
2011-08-19 10:44:45 +00:00
5f0e6dd7e9
Output all positions in a file for unresolved externals.
uz
2011-08-19 10:40:11 +00:00
c71d236da6
Enable optimizations.
uz
2011-08-19 10:05:13 +00:00
1527d26e91
Allow to display symbols and line infos for symbols.
uz
2011-08-18 20:34:31 +00:00
3a079ff332
Added cc65_line_bysymdef and cc65_line_bysymref.
uz
2011-08-18 20:11:27 +00:00
69ebab6064
Parse additional def and ref keywords for symbols.
uz
2011-08-18 16:57:51 +00:00
2a038ffef9
Output line info for symbol definition and references.
uz
2011-08-18 16:55:53 +00:00
1797235794
Read and manage additional line information for symbols.
uz
2011-08-18 16:27:18 +00:00
f8e5463278
Adapt to changed information in the object files.
uz
2011-08-18 16:26:44 +00:00
c52916f461
Remember where each symbol was defined and where it was referenced. Write this information to the object file.
uz
2011-08-18 16:25:58 +00:00
2f9e7d2ca0
Add reference counting to line infos. This allows better tracking of the ones that are actually used.
uz
2011-08-18 14:36:38 +00:00
bd233ac916
Decrease the minimum size of a collection.
uz
2011-08-18 14:13:14 +00:00
c9ddc44ebe
Change HT_Walk so that it can optionally be used to delete nodes from the hash table.
uz
2011-08-18 13:05:21 +00:00
862c0ba70e
Don't use a separate Count field for the line info type.
uz
2011-08-18 12:35:43 +00:00
d3017665d2
Replace single linked list of sections in a segment by a collection.
uz
2011-08-18 11:58:16 +00:00
2abd77ffe5
Use correct syntax. The old did work but wasn't really right.
uz
2011-08-18 11:57:57 +00:00
11d46e93b2
Export NewSpan() - this will be needed later.
uz
2011-08-18 11:57:17 +00:00
4160505c59
Don't write out spans for line infos if no debug info is requested for the object file.
uz
2011-08-18 10:36:08 +00:00
ec6acb8606
More changes to account for modules without debug info.
uz
2011-08-18 10:26:13 +00:00
0077e37182
If a symbol is an import, the corresponding export does only have a debug symbol id if the module contains debug information.
uz
2011-08-18 10:13:11 +00:00
b76fc52c1b
Added an OBJ_HAS_DBGINFO macro.
uz
2011-08-18 10:08:56 +00:00
e53f4fa163
Mark imports with a special type tag instead of relying on the export pointer being valid, because the export may not be available if the module was compiled without debug information.
uz
2011-08-18 10:04:01 +00:00
50adbf61f1
Mark imports using "type=imp".
uz
2011-08-18 09:56:53 +00:00
ae0fcbf345
Track cheap local symbols. Reduce initial collection size to one. This causes a small increase in allocations, but about 20% decrease in allocated memory. Looks like many of the collections are rather small.
uz
2011-08-17 21:34:26 +00:00
6aae186f7f
Added cc65_scope_byname.
uz
2011-08-17 21:20:10 +00:00
0d8e8a9533
Added cc65_symbol_byscope.
uz
2011-08-17 19:12:59 +00:00
0ec9ebbfaf
Added cc65_childscopes_byid.
uz
2011-08-17 19:00:34 +00:00
5edd1f7017
Added several commands to display debug file items.
uz
2011-08-17 16:27:34 +00:00
115db59743
Added cc65_line_bysource
uz
2011-08-17 16:08:26 +00:00
1d025a3230
Added cc65_line_byid.
uz
2011-08-17 15:58:21 +00:00
1c7e4b483e
Shortened some of the function names.
uz
2011-08-17 15:55:44 +00:00
386100dade
Renamed a struct member.
uz
2011-08-17 15:50:53 +00:00