cal wrote:In call0_analyze_prologue the following is usedCode: Select allprologue_sal = find_pc_line (start, 0);
if (prologue_sal.line != 0) /* Found debug info. */
body_pc = prologue_sal.end;
That means the analysis stops at .LVL8 and so misses the necessary part at .LVL9.
I thought skip_prologue_using_sal could be used to fix the problem but
as far as I see it does stop at the FIRST non prologue line, but what we need is the LAST code
OF the prologue line.
Nice catch!
I think having body_pc set to "the first non-prologue instruction" is actually what you want, isn't it? Because the loop that scans instructions has "ia < bodypc" as the terminating condition, so it won't scan the instruction at bodypc, just all the instructions preceding it.
For my 2c, I think this is possibly a compiler bug if the DWARF information doesn't correctly identify the end of the prologue, but I don't know enough about gcc and optimisations to say for sure. Fixing it in gdb seems like a good idea, regardless.
Does anybody know of a way to fake/add ROM symbols to an executable using tools from the GNU tool chain?
I think I could hack it using elfsh but would prefer some gcc/gas/gld/objcopy hackery.
I have also wanted this. jcmvbkbc's esp-elf-rom is useful but gdb tries to load it as a new image. I don't have a solution yet either, there must be a straightforward way though.
Angus