|
From: | Klaus Rudolph |
Subject: | Re: [Simulavr-devel] avrtest and simulavr vs simulavrxx |
Date: | Wed, 11 Mar 2009 13:20:41 +0100 |
User-agent: | Thunderbird 2.0.0.19 (Windows/20081209) |
Joerg Wunsch schrieb:
As Klaus Rudolph wrote:-C option: provide a "coredump" after simulation finishedIs there a typical format for this?It's a fairly homegrown (of the old simulavr) text file. I'm attaching one for reference. Also, it's always using a fixed name. Changing the format might be an option, though the human readable text file for sure does have some merit. Right now, avr-libc's testsuite uses a Python script to extract the desired information (exitcode from r24/r25, and possibly a message string from "external memory" starting at address 0x2000). This allows for a fairly simple interface to pass a result code and possibly a message from the testsuite C source file to the user.
objdump will do the job as well.
Because it is mostly a memory dump it could be binary from address 0 to end_of_ram/flash or it could be a complete elf-file which also includes the debug symbols from the loaded elf prog.Host systems typically use ELF as the coredump format, yes, but they don't duplicate the information that was already present in the actual executable file. Thus, when using a debugger to analyze a coredump file, you always have to pass both, the executable as well as the dump itself to the debugger.
Because avr devices have a very small memory footprint it is no problem to duplicate the programm/symbols content to the core file. This has the benefit that you can run a lot simulations with different modifications to your source and don't have to remember which pair of core file and executable match.
The avr-libc testsuite uses the option -B <addr>, aka. --breakpoint <addr>, in order to stop the simulation. [...]I can add that. Is there a new option format required like 0x... 0000h or something? I have no idea which format simulavrxx already have :-)Thanks for adding it. The format is a standard C string so you could use strtoul(..., 0).
Actually we use strtol(,16). And I found a nice "feature"!I have a function named f1(). If you add -Tf1 you will have a breakpoint at 0xf1! :-) Not really the expected behavior :-) Maybe we should add this to the doc? Should we do a check if symbols matches against params also if numbers found? Or should we do both and give a warning?
[Prev in Thread] | Current Thread | [Next in Thread] |