This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

"Invalid remote reply: n"


Hi,

I have recently compiled Insight for the mips2_fp_le target.  The
target is running a GDB server provided by MontaVista.  Because the
GDB compiled by Insight is quite different compared to the GDB also
provided by MontaVista (mips2_fp_le-gdb.exe), the debugger didn't work
well when I tried to start up the target.  I very soon got a sigtrap 5
signal, which was kicking out the application.

I then replaced the GDB compiled by Insight, with the one provided by
MontaVista.  So, this way, both GDB as well as GDB server are the ones
coming from MontaVista (that was advised by Daniel Jacobowitz in this
thread: http://sourceware.org/ml/gdb/2008-05/msg00098.html, thanks for
this suggestion).

That combination (so, using Insight as GUI, with both GDB and GDB
server from MontaVista) is working fine, apart from one issue:

When starting up the target application, every time a pthread is
created, I get a small dialog box with the following warning:

"Invalid remote reply: nxx"

where xx is a hexadecimal number.

When looking into the source code, this message is programmed in the
file remote.c, in the function remote_wait().

When looking into the code of that function, get_remote_state() is
called and put in a local var (ptr to struct) rs.  Then rs->buf is
assigned to another local var buf (ptr to char) and the first
character of that buffer is checked in the switch case that follows.

And indeed, the character 'n' is not part of that switch case and as
such the code is falling into the default case of that switch case,
resulting in the above mentioned feedback.

As already mentioned, it happens when pthread_create() is called.
This function will also call nptl_create_event() and at that very
moment, I get the dialog popping up, with the above mentioned message.
 So, the function nptl_create_event() is doing "something weird" that
makes the gdbserver sending a "weird" character back to the GDB client
(in this case, the character 'n').

Any idea what could cause this problem?

Best rgds,

--Geert


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]