how to debug gdb?

Alexander Tormasov a.tormasov at innopolis.ru
Fri May 7 16:59:06 CEST 2021


	Hi Tomas,
thanks to point me to fix (I initially suppose that this is related to run file options), I can move further (while mostly again start to work with printf ;-) ).

About your problem - I can say that for me for NOVA at least with gdb_monitor as a part of run script can support pthread_create, I see changes and data related (up to 8 threads checked in my golang program) in my frontend gdb (use VSCode for this purposes). 
traps / breaks somehow work (while periodically can disappears completely, despite that VSCode show them, only reliable source is a gdb console direct command like «break …»/«info break»/«info thread» ).
You need to follow article about genode gdb, at least to use manually «file» command initially for ld.lib.so, then setup break to the function where it load shared libraries and only after that you allowed to set breaks to your main code/libs - no pending operations works.

The same code do not show threads inside qemu -s, only show single-per-core thread.

I assume that qemu build-in gdb stub (which was recommended to me by Norman) do not able to see new threads for NOVA, probably it requires some special call from inside OS to inside qemu during creation of thread (may be because thread is not "native kind", native processes only  has separate set of TLB/etc related to virtual space, - I think that this could be a reason - while I did not check it).

Sincerely,
	Alexander




More information about the users mailing list