[RFA 3/3] gdbserver support for powerpc-lynxos (4.x)
Joel Brobecker
brobecker@adacore.com
Tue Aug 31 19:38:00 GMT 2010
> Hi Joel. Sorry for how long it took to get to this...
No problem - it must have taken me just as long to answer...
I followed all your suggestions. I'm still a little unsure about:
> Make sure you don't need to handle EINTR here. You may want to take
> a look at linux-low.c:my_waitpid and see whether you could do something
> of the sorts, to be able to get rid of the usleep.
I was going to say that I haven't faced a situation where I received
an EINTR, but I looked at the man page, and indeed, they mention it
explicitly.
I wonder if I could just copy/paste the implementation for Linux
with support for clone removed.... I will do that next, but I suggest
that we treat this as a separate patch? That way, we can get the bulk
out of the way, and focus on enhancing that part of the patch only.
> > + if (status->kind == TARGET_WAITKIND_STOPPED
> > + && status->value.integer == SIGTRAP)
>
> `enum target_signal' vs host signal mixup continued.
Can you spot me on this? I made the changes that I think needed
to be made, but can you verify that I made the right ones?
I also made a change to the patch that imports vasprintf: I added
a -DHAVE_CONFIG_H to the compile command, to avoid 'function implicitly
defined' gcc warnings. The file looks like this:
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
[...]
#ifdef HAVE_STRING_H
#include <string.h>
#endif
I added the define to build this file with gdbserver's config.h,
so that system headers whose inclusion is conditionalized get
included when appropriate.
The modified hunk is:
+# We build vasprintf with -DHAVE_CONFIG_H because we want that unit to
+# include our config.h file. Otherwise, some system headers do not get
+# included, and the compiler emits a warning about implicitly defined
+# functions (missing declaration).
+vasprintf.o: $(srcdir)/../../libiberty/vasprintf.c
+ $(CC) -o vasprintf.o -c $(CPPFLAGS) $(INTERNAL_CFLAGS) -DHAVE_CONFIG_H $<
Tested on lynxos 4.0. Does this look OK?
--
Joel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lynxos-vasprintf.diff
Type: text/x-diff
Size: 3802 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20100831/0ea24228/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lynxos-gdbserver.diff
Type: text/x-diff
Size: 33191 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20100831/0ea24228/attachment-0001.bin>
More information about the Gdb-patches
mailing list