Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* remote debugging with gdb
@ 2006-05-10 13:25 Martin Schuchardt
  2006-05-10 13:29 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Schuchardt @ 2006-05-10 13:25 UTC (permalink / raw)
  To: gdb

Hello to all,

I have a little "big" problem with remote debugging with gdb. I have the 
following situation: I'm implementing an own operating system with the 
help of c++ and assembler (practice at the University). We're building 
the whole system starting with an output on the Screen.
If we compile the complete system we use make. We've got a Makefile and 
Linker-Skripts. After using "make bootdisk.img" we get a file, named 
bootdisk.img (this one has to be a floppy Image which we could use with 
bochs to emulate our self-written OS). But there are some other files 
too, "system" and "system.img". The First one (system) could be the one 
to debug with gdb. The other one's purpose is completely unknown.

Okay ... now to bochs. I've recompiled bochs with "$ ./configure 
--enable-gdb-stub". I've rearranged the position of bss_base, data_base 
and text_base at the linker skript. Now I added the line
"gdbstub: enabled=1, port=1234, text_base=0x10000, data_base=0x20000, 
bss_base=0x30000" at the bochsrc.txt (the currently used Config file of 
bochs).

now I could start bochs and it stops with the line "waiting for gdb to 
connect". So I startet gdb with the file "system". Everything works 
fine. Now I have to connect gdb with bochs. That's why I'm typing 
"target remote localhost:1234" at the gdb command line.

Now I get the following error message:

(gdb) target remote localhost:1234

Remote debugging using localhost:1234
0x0000fff0 in ?? ()
Reply contains invalid hex digit 78

Does anybody know, why I get this reply? Bochs is still waiting for 
connection on localhost:1234. The complete Programm works fine without 
the debugger. (when I disable the debugger, bochs works fine and seems 
to work corrently.

mfg maddin



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: remote debugging with gdb
  2006-05-10 13:25 remote debugging with gdb Martin Schuchardt
@ 2006-05-10 13:29 ` Daniel Jacobowitz
  2006-05-10 17:53   ` Martin Schuchardt
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2006-05-10 13:29 UTC (permalink / raw)
  To: Martin Schuchardt; +Cc: gdb

On Wed, May 10, 2006 at 07:07:46PM +0200, Martin Schuchardt wrote:
> Now I get the following error message:
> 
> (gdb) target remote localhost:1234
> 
> Remote debugging using localhost:1234
> 0x0000fff0 in ?? ()
> Reply contains invalid hex digit 78
> 
> Does anybody know, why I get this reply? Bochs is still waiting for 
> connection on localhost:1234. The complete Programm works fine without 
> the debugger. (when I disable the debugger, bochs works fine and seems 
> to work corrently.

Use "set debug remote 1" to see what you've received from the remote
stub.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: remote debugging with gdb
  2006-05-10 13:29 ` Daniel Jacobowitz
@ 2006-05-10 17:53   ` Martin Schuchardt
  2006-05-10 18:26     ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Schuchardt @ 2006-05-10 17:53 UTC (permalink / raw)
  To: drow, gdb

Hello Daniel,

I've received the following:

(gdb) target remote localhost:1234
Remote debugging using localhost:1234
Sending packet: $Hc-1#09...Ack
Packet received: OK
Sending packet: $qC#b4...Ack
Packet received: 1
Sending packet: $qOffsets#4b...Ack
Packet received: Text=0;Data=0;Bss=0
Sending packet: $?#3f...Ack
Packet received: S05
Sending packet: $Hg0#df...Ack
Packet received: OK
Sending packet: $p8#a8...Ack
Packet received:
Sending packet: $g#67...Ack
Packet received: 
0000000000000000430500000000000000000000000000000000000000000000f0ff00000200000000f000000000000000000000000000000000000000000000
Sending packet: $mfff0,8#33...Ack
Packet received: 0000000000000000
Sending packet: $mfff0,7#32...Ack
Packet received: 00000000000000
0x0000fff0 in ?? ()
Sending packet: $qSymbol::#5b...Ack
Packet received: ENN
Packet qSymbol (symbol-lookup) is supported
Sending packet: $qPart:auxv:read::0,147#48...Ack
Packet received: ENN
Packet qPart_auxv (read-aux-vector) is supported
Reply contains invalid hex digit 78

mfg maddin

Daniel Jacobowitz wrote:
> On Wed, May 10, 2006 at 07:07:46PM +0200, Martin Schuchardt wrote:
>> Now I get the following error message:
>>
>> (gdb) target remote localhost:1234
>>
>> Remote debugging using localhost:1234
>> 0x0000fff0 in ?? ()
>> Reply contains invalid hex digit 78
>>
>> Does anybody know, why I get this reply? Bochs is still waiting for 
>> connection on localhost:1234. The complete Programm works fine without 
>> the debugger. (when I disable the debugger, bochs works fine and seems 
>> to work corrently.
> 
> Use "set debug remote 1" to see what you've received from the remote
> stub.
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: remote debugging with gdb
  2006-05-10 17:53   ` Martin Schuchardt
@ 2006-05-10 18:26     ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2006-05-10 18:26 UTC (permalink / raw)
  To: Martin Schuchardt; +Cc: gdb

On Wed, May 10, 2006 at 07:26:47PM +0200, Martin Schuchardt wrote:
> Hello Daniel,
> 
> I've received the following:

Sorry, didn't realize you'd replied to the list too :-)  My response
again, for the archives.

> Packet received: ENN
> Packet qSymbol (symbol-lookup) is supported
> Sending packet: $qPart:auxv:read::0,147#48...Ack
> Packet received: ENN
> Packet qPart_auxv (read-aux-vector) is supported
> Reply contains invalid hex digit 78

Ask the bochs developers to fix this.

1.  "ENN" in the documentation is supposed to mean "E followed by a two
digit number".

2.  If an entirely unsupported packet is received, the stub should not
respond with "ENN", but with "" (an empty packet).

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-10 13:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-10 13:25 remote debugging with gdb Martin Schuchardt
2006-05-10 13:29 ` Daniel Jacobowitz
2006-05-10 17:53   ` Martin Schuchardt
2006-05-10 18:26     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox