IRC channel logs

2022-01-18.log

back to list of logs

<slex>Hello guys, there is a problem with gdb
<slex>I did write, to have confirmation, a little hello world, that just printf hello world and return 0
<slex>SO if i run gdb on the hurd, putting a break hello.c:5, where 5 is the line of the printf, it doesn't break, prints "Hello world" and then /hurd/crash gives me some error codes
<slex>internal error: inferior* find_inferior_pid(process_statum_target*, int))
<slex>Assertion pid != 0
<slex>failed
<slex>A problem internal to GDB has been detected
<slex>further debugging may prove unreliable
<slex>that is the output and then i said yes to create the core file
<kilobug>slex: just to be sure, you compiled the hello world with debug settings ? (ie, -O0 -g) or with prod settings (ie, -O2) ?
<slex>yes
<kilobug>slex: but apart from that general remark I don't know much about gdb internals so I won't be of much help sorry
<slex>because it works settings the symbol in this way
<slex>break parse_arguments
<slex>or break map_add
<slex>those are functions implementd by me
<youpi>iirc gdb broke a bit
<youpi>help welcome on this :)
<slex>youpi: I will try :) I had to implement a little linked map (key-value) to give the possibilitity to track servers that register to my nameserver. The nice things is that i made it quite generic and it is also working to keep the arguments in another map so if i do something like this:
<slex>./hello_custom_server --host-priv-port=1 --key=--host-priv-port
<slex>it will search vor the key --host-priv-port and return the associated value, with some facilities to convert from string to int and so on
<luckyluke>biblio: I fixed one page map issue, now I have another page fault but at least this it's catched by kdb :)