Discussion:
gdbstub initial code, v4
Oleg Nesterov
2010-08-19 17:49:55 UTC
Permalink
Changes:

Only internal cleanups. I was busy with utrace fixes
and testing.

With utrace patches I sent, I do not see any problems so far.
But utrace definitely needs more changes.

Next step: handle exit correctly and report W/S. I misunderstood
what gdbserver does when the main thread exits, it is not stupid
as I wrongly thought.

Note the second attachment, GDBCAT. It is just the simple perl
script which connects /proc/ugdb to tcp port. It can be used for
remote debugging via tcp, or with (unpatched) gdb which can't do
select() on /proc/ugdb. Actually, it is more convenient to use
it in any case, at least for logging purposes.

Oleg.
Roland McGrath
2010-08-19 23:14:03 UTC
Permalink
Post by Oleg Nesterov
Note the second attachment, GDBCAT. It is just the simple perl
script which connects /proc/ugdb to tcp port. It can be used for
remote debugging via tcp, or with (unpatched) gdb which can't do
select() on /proc/ugdb.
bash$ nc -l 2000 <> /proc/ugdb &
Post by Oleg Nesterov
Actually, it is more convenient to use
it in any case, at least for logging purposes.
(gdb) set remote debug 1


Thanks,
Roland
Oleg Nesterov
2010-08-20 17:49:28 UTC
Permalink
Post by Roland McGrath
Post by Oleg Nesterov
Note the second attachment, GDBCAT. It is just the simple perl
script which connects /proc/ugdb to tcp port. It can be used for
remote debugging via tcp, or with (unpatched) gdb which can't do
select() on /proc/ugdb.
bash$ nc -l 2000 <> /proc/ugdb &
Yes, this works,
Post by Roland McGrath
Post by Oleg Nesterov
Actually, it is more convenient to use
it in any case, at least for logging purposes.
(gdb) set remote debug 1
set debug remote 1. Yes, I tried this. Very, very inconvenient.
In this case the debugging output is mixed with the normal output,

Also: you can't save to file, can't filter packets, can't add
the packet for debugging (not implemented yet).

But yes, it is not strictly necessary, nc should work too.

Oleg.
Daniel Jacobowitz
2010-08-20 18:21:22 UTC
Permalink
Post by Oleg Nesterov
Post by Roland McGrath
(gdb) set remote debug 1
set debug remote 1. Yes, I tried this. Very, very inconvenient.
In this case the debugging output is mixed with the normal output,
Also: you can't save to file, can't filter packets, can't add
the packet for debugging (not implemented yet).
set remotelogfile filename addresses those first two. I don't know
what you mean by the last thing, but if it's useful, gdb can perhaps grow a
way to do it.
--
Daniel Jacobowitz
CodeSourcery
Loading...