Opened 7 years ago

Last modified 11 months ago

#11596 assigned bug

Debugger: no disassembly for functions written in assembly

Reported by: jua Owned by: anevilyak
Priority: normal Milestone: R1.1
Component: Applications/Debugger Version: R1/Development
Keywords: Cc: bonefish
Blocked By: Blocking:
Platform: All


Debugger doesn't show disassembly when stepping from C code into a function written in assembly, the source view simply goes blank. The attached example program, which calls a useless little assembly function, can be used to reproduce it.

Attachments (1) (7.8 KB ) - added by jua 7 years ago.

Download all attachments as: .zip

Change History (7)

by jua, 7 years ago

Attachment: added

comment:1 by anevilyak, 7 years ago

Owner: set to anevilyak
Status: newassigned

comment:2 by anevilyak, 7 years ago

Cc: bonefish added

There seems to be something going on in the debug APIs as far as this one is concerned. The debug symbol iterator never actually returns that particular symbol, though it returns all the others listed by objdump. I'm not seeing anything unusual about it though, so I'm a bit puzzled as to what's going on there. Will dig into it further, but in the meantime, ideas welcome.

comment:3 by anevilyak, 7 years ago

Found the reason:

00000850 g .text 00000000 assembly_function

The symbol isn't actually flagged as a function in this case. Consequently, NextSymbol() skips it. Not sure of a good way around that though.

comment:4 by jua, 7 years ago

Indeed, setting the symbol type to function and specifying a size via NASM ELF-specific directives makes it work. So it would be reasonable to mark this bug as invalid (although it works in gdb, so the question would be, does it make sense to be more tolerant about symbols in this case).

comment:5 by pulkomandy, 4 years ago

I have a similar problem with code generated by JIT in WebKit. I suspect there is no symbol at all in that case, but it should still be possible to disassemble the code.

26MB core file:

comment:6 by pulkomandy, 11 months ago

Milestone: R1R1.1
Note: See TracTickets for help on using tickets.