gdb_monitor does not work

Alexander Senier senier at componolit.com
Thu Aug 9 17:36:44 CEST 2018


Hi Christian,

thanks for the pointer! Indeed, proper initialization was missing. When
executing the following commands in gdb, the debug session works as
expected:

target remote localhost:5555


set interactive-mode off
break binary_ready_hook_for_gdb
continue
delete 1
file debug/test-log
set solib-search-path debug
sharedlibrary

Cheers,
Alex

On 09.08.2018 16:49, Christian Prochaska wrote:
> Hi Alex,
> 
> On 09.08.2018 16:08, Alexander Senier wrote:
>> GDB does not seem to work correctly:
>>
>> (gdb) bt
>> #0  _start () at
>> /home/alex/Documents/Componolit_GmbH/Devel/src/genode-master/repos/base/src/lib/startup/spec/x86_64/crt0.s:43
>> Cannot access memory at address 0x0
>>
>> [init -> gdb_monitor] Warning: read: no memory at address 0x0
>>
>>
>> Any ideas what's wrong here?
> 
> The problem could be that the binary ('test-log') has not been loaded
> into memory by 'ld.lib.so' yet. I would suggest to use
> 'ports/run/gdb_monitor_interactive.run' or
> 'ports/run/debug_nitpicker.run' as template for your use case. These run
> scripts execute some GDB commands for initialization, like breaking at
> 'binary_ready_hook_for_gdb()' first and then loading the symbols of the
> appplication and its shared libraries.
> 
> Regards,
> Christian
> 
> 
> _______________________________________________
> Genode users mailing list
> users at lists.genode.org
> https://lists.genode.org/listinfo/users
> 

-- 
Componolit GmbH · Königsbrücker Straße 124 · 01099 Dresden · Germany
Amtsgericht Dresden · HRB 36670 · Sitz Dresden
Geschäftsführer: Alexander Senier · USt-IdNr. (EU VATIN): DE312113634

http://componolit.com · @Componolit



More information about the users mailing list