1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-15 10:29:00 +00:00
Commit Graph

2307 Commits

Author SHA1 Message Date
uz
badfe85991 Allow arbitrary alignments, not just powers of two. Beware: This needs support
in the linker which is currently missing.
                                         


git-svn-id: svn://svn.cc65.org/cc65/trunk@5334 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:54:52 +00:00
uz
be14b8e5e4 Bumped object file version since file format has changed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5333 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:53:42 +00:00
uz
281b04d066 Added LARGE_ALIGNMENT.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5332 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:53:15 +00:00
uz
71b134db78 Fix warning about possibly uninitialized variable.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5331 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:45:20 +00:00
uz
7d187fe92c Export MAX_ALIGNMENT.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5330 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:36:28 +00:00
uz
d0555c400e New function AlignCount.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5329 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:31:36 +00:00
uz
d956320687 Fix the factorization routine and hide it in the module. The others don't need
to know about it, they can use the lcm calculation routine.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5328 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 22:18:05 +00:00
ol.sc
143dcec5e6 Added preliminary support for -t option.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5327 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 16:53:11 +00:00
ol.sc
e10e029e8c Removed -f option. Just always overwrite files - as the other tools do.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5323 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 14:29:59 +00:00
uz
f1c2684c5b Added functions to factorize a value and to create the lcm of two factorized
numbers.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5322 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 12:58:15 +00:00
ol.sc
5f9a3d2502 Fixed typo.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5319 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 01:23:01 +00:00
ol.sc
90621257e7 Allow for custom icon for a GEOS app by allowing user to specify an external 63-byte sprite file - which is simply translated to an '.incbin' command.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5318 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 01:11:22 +00:00
ol.sc
d810ed97d2 Redesigned GEOS VLIR linking:
- No more post-linking with resource compiler, rather ld65 directly creates the VLIR CVT file.
- No more dynamic linker config creation, rather the built-in 'geos' config is usable both for SEQ CVT and VLIR CVT files.

ToDos:
- Have ld65 accept alignment to $FD.
- Adjust docs / samples.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5314 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-26 22:54:04 +00:00
uz
1947d15c48 New include file for address alignment.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5313 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-26 22:38:06 +00:00
uz
e8174de0f1 Fixed an error introduced in revision 4427: The list of 65816 instructions
contained two items less than the counter said (because in 4427 two were
deleted without adjusting the counter). Depending on the compilers
implementation of bsearch(), some of the 65826 instructions were not found
when searching the table.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5310 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-11 23:40:53 +00:00
uz
5449f21d9f When generating the dependency file, escape spaces in file names.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5307 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-05 21:32:59 +00:00
uz
49c457f518 Disallow __asm__ on global level.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5303 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-11-07 21:25:20 +00:00
uz
ab83d5cd78 Fixed an internal error caused by muddling through after an error occurred and
trying to add a duplicate identifier into the symbol table.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5300 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-18 20:36:19 +00:00
uz
6a716ae43b Fixed an error: The output file shouldn't be opened in binary mode (thefox).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5297 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-04 10:41:43 +00:00
uz
76e9fc8c65 Small fix for an error message.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5296 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-03 19:11:12 +00:00
uz
5050157eda Make the type of a C symbol available.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5295 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-01 20:53:42 +00:00
uz
3ec4b296ba Added functions to access the c symbols in the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5294 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-01 20:51:07 +00:00
uz
8504f42497 Postprocess and cross-reference C symbol infos.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5293 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-01 10:21:25 +00:00
uz
e63dcb46f1 Fixed an error: Symbol references for csyms were output as local, not global
ids.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5292 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-01 10:00:31 +00:00
uz
d1abb7e808 New flag that tells if the HLL symbol has an asm symbol attached.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5291 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-31 21:00:20 +00:00
uz
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).


git-svn-id: svn://svn.cc65.org/cc65/trunk@5290 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-31 20:48:40 +00:00
uz
f204ec956a Parse csym lines in the debug info file. No api functions til now.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5289 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 13:19:28 +00:00
uz
1157cff1bd Validate the type passed in .dbg statements at least loosely.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5288 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 13:18:50 +00:00
uz
b4afe56ef1 For now use the void type for all debug symbols to avoid errors in the
backends.
         


git-svn-id: svn://svn.cc65.org/cc65/trunk@5287 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 13:09:34 +00:00
uz
2438497e9f Shorten "extern" -> "ext".
git-svn-id: svn://svn.cc65.org/cc65/trunk@5286 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 13:04:08 +00:00
uz
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.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5285 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 11:42:26 +00:00
uz
2f82cb4fb8 The geos resource compiler was still called by its old name (Greg King).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5284 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 09:38:53 +00:00
uz
060cfe66e0 Renamed hldbgsym -> hlldbgsym.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5283 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-29 20:37:28 +00:00
uz
c2bf1b9ba4 Some code cleanup.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5282 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-29 20:30:57 +00:00
uz
eee6068029 Write the high level debug info to the object file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5281 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-29 20:02:06 +00:00
uz
314476de27 Added an offset field to the high level language symbol definition.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5280 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-29 18:55:29 +00:00
uz
305cf64d40 Worked on high level language symbol info.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5279 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-29 18:55:03 +00:00
uz
2e7afb6a8d Added a module for high level language debug symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5278 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-28 20:01:51 +00:00
uz
548a29e076 Added output of types.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5277 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-28 15:10:43 +00:00
uz
534c630a23 Fixed the layout for the span output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5276 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-28 14:44:41 +00:00
uz
12035b910e Added span output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5275 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-26 20:03:11 +00:00
uz
6b8efa8e9b Add a (currently empty) type string to the debug info for symbols and functions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5274 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-26 13:01:29 +00:00
uz
2fbebd25cf Started to add debug infos for C functions and symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5273 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-26 12:05:00 +00:00
uz
c2d859b9f3 Fix a C89 incompatibility (Stefan Haubenthal).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5272 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-26 10:05:28 +00:00
uz
7c96984473 Pointers passed outside the module should be const.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5271 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-26 10:05:08 +00:00
uz
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).


git-svn-id: svn://svn.cc65.org/cc65/trunk@5270 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-25 18:59:25 +00:00
uz
3e84a2bd93 Fix type string for .ADDR and .FARADDR.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5269 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-23 18:05:31 +00:00
uz
262ed5db8b Fixed a bug: Never remember a pointer to a string buffer, since it becomes
invalid when the string buffer gets resized.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5268 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-23 18:04:25 +00:00
uz
d225866449 Renamed GT_GetArraySize to GT_GetElementCount.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5267 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-23 18:01:23 +00:00
uz
25171465d3 Implement variable sized element count for arrays.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5266 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-23 16:15:41 +00:00
uz
1e0ab407cd Added the LineInfo count to the info line of the debug info file. This allows
the debug info module to reduce memory usage.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5265 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 21:52:40 +00:00
uz
3b61ee2f5a Track types, parse the extended debug info format with "type" lines.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5264 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 19:37:10 +00:00
uz
374b106b06 Maintain the types as separate indexed items in the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5263 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 18:22:45 +00:00
uz
b064002266 Added a tpool module that implements a global pool for generic types, so we
can merge duplicate ones and assign them global ids.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5262 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 17:53:00 +00:00
uz
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.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5261 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 17:36:19 +00:00
uz
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.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5260 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:50:39 +00:00
uz
4e43a293c6 Parse (but ignore) type information for spans.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5259 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:18:27 +00:00
uz
660df16d08 Write out type information for spans to the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5258 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:18:09 +00:00
uz
b88dc209fc Change prototype for GT_AsString to make it easier usable.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5257 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:17:43 +00:00
uz
6e47980eb7 Generate span types for .ADDR, .BYTE, .DBYT, .FARADDR and .WORD.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5256 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:17:22 +00:00
uz
6583320b79 Added GT_AsString().
git-svn-id: svn://svn.cc65.org/cc65/trunk@5255 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:04:27 +00:00
uz
cc486bb4f5 Don't remember types for spans if no debug info is requested.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5254 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 19:46:47 +00:00
uz
913db79017 Add an optional type to a span.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5253 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 19:44:02 +00:00
uz
f2de523b5d The string with index zero is the first string in the string pool.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5252 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 19:35:51 +00:00
uz
ac2b837285 Some work on the generic type module.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5251 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 19:27:03 +00:00
uz
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.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5250 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 19:08:23 +00:00
uz
37ac033370 Added CollReplaceExpand.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5249 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 17:30:25 +00:00
uz
d0d550be66 Fix errors in tracking the number of items in the table. Added function
HT_GetCount to retrieve the number of items.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5248 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 16:56:40 +00:00
uz
ae98f4bcd8 Fix a problem with macro expansion count in line infos for macros.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5247 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 16:23:38 +00:00
uz
6cdac5eb4c Fixed a bug in SP_Add.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5246 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 16:08:52 +00:00
uz
7fe0958b91 The ...Entry functions from the hashtab module have been renamed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5245 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:35:36 +00:00
uz
58ffb47250 The ..Entry functions from the hashtable module have been renamed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5244 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:33:06 +00:00
uz
96ce71ad5f Removed the functions that work on HashNodes since they are mostly useless
now.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5243 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:31:30 +00:00
uz
77110021ab Implementation of StringPool has changed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5242 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:21:11 +00:00
uz
4461988fd1 Implementation of SP_GetCount has been missing.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5241 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:20:48 +00:00
uz
bf889a1928 Implementation of StringPool has changed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5240 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:16:14 +00:00
uz
e1a861f0a5 Use the hashtab to implement the string pool hash table.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5239 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:15:52 +00:00
uz
f3b49b57bd Add a gentype.c module that contains GT_FromStrBuf.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5238 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-20 22:13:58 +00:00
uz
85584fb404 Small change for better hash table distribution.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5237 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-20 21:53:22 +00:00
uz
ef412bc22c Added a new gentype module for generic (not language dependent) types.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5236 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-20 20:16:13 +00:00
uz
78551ba832 Read segment sizes as var, no longer as 32 bit values.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5235 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 20:58:14 +00:00
uz
6a01a3407a Read the segment size as var, not as 32 bit value.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5234 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 20:56:44 +00:00
uz
1e20489ee1 Renamed some stuff. Write out the segment size as var, not 32 bit.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5233 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 20:55:48 +00:00
uz
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.
                                            


git-svn-id: svn://svn.cc65.org/cc65/trunk@5232 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 15:24:11 +00:00
uz
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.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5231 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 15:06:51 +00:00
uz
7ee90fb21b Added cc65_line_byspan and cc65_scope_byspan.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5230 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 14:39:11 +00:00
uz
7fa197337b Add the number of attached lines and scopes to a span.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5229 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 14:31:03 +00:00
uz
bc0f3fd99b Removed some debug output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5228 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:30:31 +00:00
uz
61f3e1dce3 Allow more space for symbol names.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5227 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:22:36 +00:00
uz
aff6d02c43 Remove CollConstAt. Let CollAt and CollAtUnchecked take const pointers to
collections. Use const pointers in many places. Some other cleanups.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5226 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:21:22 +00:00
uz
88774521a3 Use CollTransfer where possible.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5225 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:06:52 +00:00
uz
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.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5224 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:01:01 +00:00
uz
307b8d88c3 Reenable optimizations.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5223 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:46:49 +00:00
uz
68db31c53b Changed data type used to store line numbers from unsigned long to unsigned.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5222 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:44:45 +00:00
uz
5f0e6dd7e9 Output all positions in a file for unresolved externals.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5221 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:40:11 +00:00
uz
c71d236da6 Enable optimizations.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5220 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:05:13 +00:00
uz
1527d26e91 Allow to display symbols and line infos for symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5219 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 20:34:31 +00:00
uz
3a079ff332 Added cc65_line_bysymdef and cc65_line_bysymref.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5218 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 20:11:27 +00:00
uz
69ebab6064 Parse additional def and ref keywords for symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5217 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:57:51 +00:00
uz
2a038ffef9 Output line info for symbol definition and references.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5216 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:55:53 +00:00
uz
1797235794 Read and manage additional line information for symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5215 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:27:18 +00:00
uz
f8e5463278 Adapt to changed information in the object files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5214 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:26:44 +00:00
uz
c52916f461 Remember where each symbol was defined and where it was referenced. Write this
information to the object file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5213 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:25:58 +00:00
uz
2f9e7d2ca0 Add reference counting to line infos. This allows better tracking of the ones
that are actually used.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5212 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 14:36:38 +00:00
uz
bd233ac916 Decrease the minimum size of a collection.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5211 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 14:13:14 +00:00
uz
c9ddc44ebe Change HT_Walk so that it can optionally be used to delete nodes from the hash
table.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5210 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 13:05:21 +00:00
uz
862c0ba70e Don't use a separate Count field for the line info type.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5209 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 12:35:43 +00:00
uz
d3017665d2 Replace single linked list of sections in a segment by a collection.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5208 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 11:58:16 +00:00
uz
2abd77ffe5 Use correct syntax. The old did work but wasn't really right.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5207 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 11:57:57 +00:00
uz
11d46e93b2 Export NewSpan() - this will be needed later.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5206 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 11:57:17 +00:00
uz
4160505c59 Don't write out spans for line infos if no debug info is requested for the
object file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5205 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:36:08 +00:00
uz
ec6acb8606 More changes to account for modules without debug info.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5204 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:26:13 +00:00
uz
0077e37182 If a symbol is an import, the corresponding export does only have a debug
symbol id if the module contains debug information.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5203 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:13:11 +00:00
uz
b76fc52c1b Added an OBJ_HAS_DBGINFO macro.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5202 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:08:56 +00:00
uz
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.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5201 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:04:01 +00:00
uz
50adbf61f1 Mark imports using "type=imp".
git-svn-id: svn://svn.cc65.org/cc65/trunk@5200 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 09:56:53 +00:00
uz
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.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5199 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 21:34:26 +00:00
uz
6aae186f7f Added cc65_scope_byname.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5198 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 21:20:10 +00:00
uz
0d8e8a9533 Added cc65_symbol_byscope.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5197 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 19:12:59 +00:00
uz
0ec9ebbfaf Added cc65_childscopes_byid.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5196 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 19:00:34 +00:00
uz
5edd1f7017 Added several commands to display debug file items.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5195 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 16:27:34 +00:00
uz
115db59743 Added cc65_line_bysource
git-svn-id: svn://svn.cc65.org/cc65/trunk@5194 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 16:08:26 +00:00
uz
1d025a3230 Added cc65_line_byid.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5193 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 15:58:21 +00:00
uz
1c7e4b483e Shortened some of the function names.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5192 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 15:55:44 +00:00
uz
386100dade Renamed a struct member.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5191 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 15:50:53 +00:00
uz
9724ed5506 Added cc65_seginfo_byname.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5190 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 15:26:40 +00:00
uz
fa6b2e40fd Added cc65_get_scopelist. Added a few statistics field to the DbgInfo
structure.
          


git-svn-id: svn://svn.cc65.org/cc65/trunk@5189 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 15:18:22 +00:00
uz
771695577d Replaced the old dbgtest program by a debug info shell.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5188 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 22:37:01 +00:00
uz
7d7667f782 Handle imports correctly.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5187 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 14:25:18 +00:00
uz
3996725f44 Write imports out to the debug info file. Add the id of the corresponding
export.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5186 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 13:58:59 +00:00
uz
b7c4a4fe01 Write imports out as debug symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5185 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 13:39:00 +00:00
uz
cc1326c6c2 Dump export and import ids.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5184 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 12:53:48 +00:00
uz
aa1a103154 Track export ids of debug symbols and write the to the object file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5183 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 12:52:56 +00:00
uz
63c53499be If a debug symbol is an import, write out the import id.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5182 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 12:33:19 +00:00
uz
1917591b94 Renamed variables for better readability.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5181 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 12:08:43 +00:00
uz
11be5d6261 Handle the new symbol flags correctly. Changed - among other things - the
data types of members in the management structures.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5180 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 11:50:27 +00:00
uz
7323035a89 Do also write the im-/export flags to the symbol flags in an object file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5179 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 11:37:19 +00:00
uz
2d23dffe06 Added flags for im- and export.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5178 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 11:34:46 +00:00
uz
3e653f6266 Many changes. Map spans instead of line infos into the address space. Quite
some API changes. The test program is almost useless and has to be replaced.
                                                                            


git-svn-id: svn://svn.cc65.org/cc65/trunk@5177 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 21:46:39 +00:00
uz
eadbb7dcb0 Remove CollFirst in favour of CollAt.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5176 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 17:57:26 +00:00
uz
8d8c676be2 Add cc65_idlist.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5175 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 17:42:43 +00:00
uz
51e918cdfe Track the main scope of modules.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5174 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 17:36:38 +00:00
uz
34d393a76f Fixed problems with the range check on 64 bit machines.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5173 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 17:25:49 +00:00
uz
aaa19a569d The line number is now of type unsigned.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5172 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 17:25:23 +00:00
uz
b097b49a4a Fixed even more problems with the range check.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5171 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 17:23:44 +00:00
uz
cd50385b72 Fixed a problem with the range check.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5170 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 17:19:05 +00:00
uz
d02c1cc417 Line number is now an unsigned
git-svn-id: svn://svn.cc65.org/cc65/trunk@5169 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 16:09:34 +00:00
uz
d758b39dfc Line number is now an unsigned.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5168 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 16:08:50 +00:00
uz
da307b9a13 Change the type of the line number from unsigned long to unsigned since the
tools won't run on a 16 bit platform anyway. And if so, line numbers limited
to 65535 are probably the least problem.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5167 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 16:08:15 +00:00
uz
6e32190cae A few measures to create slightly smaller object files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5165 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-14 20:06:14 +00:00