26 September 2021, 06:34 | #1 |
Registered User
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
|
Devpac Debug Issue with multiple files
I've split my code into many files, but when I debug my code that isnt' into main file, MONAM won't show me proprerly my code. There is a way to show my debug code correctly when I debut it? Here a PIC:I'm debugging a code which is into another file. Monam show me raw data instead codes' label(red circle)
|
26 September 2021, 23:06 | #2 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,546
|
Not many replys, maybe because you gave not enough information.
What do you expect MonAm to show "properly" and "correctly"? The symbols (InitLinkedList) are obviously there. Are you missing the correct source text line in the bottom window to be displayed? Don't know which "labels" you are missing, though. And how did you split your code over multiple files? Did you assemble them separately to generate multiple object files? With HCLN or LINE debug hunks? Or did you just include multiple source files into a single source file? |
27 September 2021, 09:07 | #3 | |
Registered User
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
|
Quote:
What it's missided are simbols from source code: I see offsets instead "labels name". I'll show you: Into red circle you'll see what I would like to see into Monam, instead numbers, like I see now( previous pic) [IMG][/IMG] |
|
27 September 2021, 09:31 | #4 | |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,316
|
Quote:
(-; Hardly. You use at least one, namely that where your code is in. That cannot work. The debugger can hardly know what type of structure a0 is pointing to, so it cannot relate the offsets to any particular symbol. An offset of 4 from a0 could mean a lot, e.g. it could also mean ln_Pred (from exec/nodes.i). |
|
27 September 2021, 09:38 | #5 |
Registered User
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
|
|
27 September 2021, 11:57 | #6 | |
old bearded fool
Join Date: Jan 2010
Location: Bangkok
Age: 57
Posts: 779
|
From the Devpac manual.
Quote:
|
|
27 September 2021, 15:21 | #7 |
Registered User
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
|
@modrobert
Thanks a lot |
29 September 2021, 12:33 | #8 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,546
|
Quote:
-loption: Code:
genam -l -otest.o test.asm |
|
29 September 2021, 19:02 | #9 |
Registered User
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
|
@phx
Thanks |
29 September 2021, 22:27 | #10 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Quote:
Not necessarily. ASM-One (and its many derivates) cache include files so they are only increasing the build time the very first time they are accessed. |
|
30 September 2021, 19:16 | #11 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
Including source files is of course also necessary for any code that isn't dead (finished) in any language.
It's good practice to move parts of code (source or compiled) into separate files. Even parts of code you think aren't quite dead (finished) yet. This creates structure, and a basic Separation of Concerns, in any language. You can absolutely write a debug symbols exporter that relates a value in the code to an exported symbol. The debugger must support it. Last edited by Photon; 30 September 2021 at 19:22. |
30 September 2021, 22:17 | #12 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,316
|
In that case, exactly once. Thus, there is no gain. The trouble is, if you change a file, you need to reassemble everything again, instead of just link the binaries of the modules.
|
30 September 2021, 22:19 | #13 | |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,316
|
Quote:
Code:
move.l d0,4(a0) |
|
30 September 2021, 22:22 | #14 |
Registered User
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
|
Bit when All Is into main file, It works ad expected. All sources symbols, labels and so forth are well dislayed
|
30 September 2021, 23:46 | #15 | |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
What sort of tool chain are you running? Having all of your code in one file is unworkable - I have a general rule where I try to keep my source files all under 1000 lines of assembler and I hold all data vars in separate files. i.e. main.asm -> main.dat sprite.asm -> sprite.dat I don't use linkers, I know I could but with the speed with which vasm assembles code I simply do not see the need for compiling each file as an object and linking it. |
|
01 October 2021, 01:49 | #16 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
Quote:
Compiling and linking finished code is only important when the code is -- finished. I don't know why you're somehow against including finished or unfinished code as source. The half second of compile time is for the author to decide, and certainly not a bad habit, rather the opposite. |
|
01 October 2021, 02:51 | #17 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,017
|
I use Devpac exclusively, and have never had a problem with multiple files.
I tend to have a main code file, and then include files for generic stuff like killing AmigaDOS and restoring, theres no need to have these well used routines cluttering up the main code file because I no longer need to fiddle with them, they work and are reliable, so they are separate and get included at assembly. Same with other routines, PHX's playroutine is separate, I know how to access it and call it, I don't need it in the main code file. Its how a lot of programmers used Devpac because its typically very reliable with multiple files, I only ever found Master Devpac buggy but then I don't think it was an official release. |
01 October 2021, 07:48 | #18 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,316
|
As apparently you seem to know more than I, please demonstrate that with DevPac/MonAm, and please explain me which entries in the Amiga debug hunk format provides this information. I'm talking about symbols created with "rsreset" and "rs.b/rs.w/rs.l". Here is the cruncher: Given a pointer in a register (say, a0), how does the debugger know (upon disassembly) whether a0 points to a "struct Node" or a "struct MinList", and thus select the proper symbol for "4(a0)". I do not know how to do that.
|
01 October 2021, 07:55 | #19 |
Registered User
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,344
|
Thomas,
I Never had this kind of problems with visual studio. Its Just a Little bit annoying, not a big del. |
01 October 2021, 09:44 | #20 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Quote:
Then the debugger sees the 4, looks for its address (not its value) in the table, and, if found, displays the name instead. I don't know if it's actually done this way, but it is how i would do it. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Devpac Debug hunks | phx | Coders. General | 21 | 16 July 2023 08:13 |
Assembler files and C in GCC / bartman's amiga-debug | zero | Coders. C/C++ | 11 | 12 March 2021 16:17 |
Devpac include files? | anotheramigafan | Coders. General | 2 | 21 August 2018 21:44 |
Open '.txt' files in Devpac without CR\LF Characters | Blip | Coders. General | 4 | 11 January 2018 03:46 |
Debugging included files (AsmOne vs DevPac) | nandius_c | Coders. Asm / Hardware | 4 | 24 August 2014 13:19 |
|
|