[Libre-soc-bugs] [Bug 1228] SFFS ISACaller userspace ELF support for dynamic linking and PIC

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Dec 7 11:53:41 GMT 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1228

--- Comment #14 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #12)
> (In reply to Luke Kenneth Casson Leighton from comment #9)
> > my thoughts: single-stepping through the entire program under qemu
> > using the Test API would give a FULL instruction AND register AND
> > memory-access trace that would allow instruction-by-instruction EXACT and 
> > i do mean EXACT replication such that "diff -u" tells you precisely
> > and immediately the deviation.
> 
> two issues with this idea: the code we have uses qemu in system mode, in
> system mode qemu doesn't emulate syscalls, so it won't match.

https://git.libre-soc.org/?p=kvm-minippc.git;a=summary
installed and runnabe on talos1.libre-soc.org qemu-user *should*
be single-steppable.  talos1 has been placed into "HASH VM" not
RADIX mode in order to take advantage of hypervisor single-step
debugging.

i don't know if that will help?


> in user mode, qemu uses an arbitrary non-default code base address of
> 0x4000...something (i tried changing it, didn't seem to work), this is not
> at all what happens when just running it in gdb under a ppc64le kernel. to
> match qemu would require implementing relocations and figuring out what all
> qemu does, and then we would match linux itself less well.
> 
> so, because of that, I'm just running under gdb with `record full` enabled:

pffh, if it works it works. awesome.


> then you can use gdb's reverse debugging features to try and find where it
> matches ISACaller or not.

combined with the ISACaller instruction logging.
which hm should have a more "verbose dump" mode
to correspond with the verilator/microwatt debug (DMI interface)
work i did 3+ years ago.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list