This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: pthread_t ids of threads not showed by "thread info"
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb at sourceware dot org
- Cc: "Ulrich Weigand" <uweigand at de dot ibm dot com>, Mark Kettenis <mark dot kettenis at xs4all dot nl>, stefano dot sabatini-lala at poste dot it
- Date: Wed, 4 Aug 2010 19:20:22 +0100
- Subject: Re: pthread_t ids of threads not showed by "thread info"
- References: <201008041744.o74HiVCJ022771@d12av02.megacenter.de.ibm.com>
On Wednesday 04 August 2010 18:44:31, Ulrich Weigand wrote:
> Pedro Alves wrote:
>
> > > Thanks. We can then just call linux_init_abi at the top of
> > > s390_gdbarch_init, right?
> >
> > Or rather, a bit further down, where the gdbarch is actually
> > created, like so?
>
> Actually, I think it should be rather at the end, where other
> architectures which support multiple OSABIs call gdbarch_init_osabi.
>
> That way, at least basic setup of the architecture is already done
> when the osabi routine is called ...
Ah, agreed. I've now placed it just above some core file and other
OS specific-ish bits, although there are a few non-OS things
mingled a bit below too.
(OOC, I wonder whether there's anything technically preventing
installing an GDB_OSABI_LINUX osabi callback and move
these linux related bits there, to keep things neat.)
> Oh, something else:
>
> > * s390-tdep.c: Include linux-tdep.h.
>
> The patch you posted doesn't :-)
Bah, sorry, forgot to "quilt refresh" before copy&paste. :-)
Let try once more...
--
Pedro Alves
2010-08-04 Pedro Alves <pedro@codesourcery.com>
* s390-tdep.c: Include linux-tdep.h.
(s390_gdbarch_init): Call linux_init_abi.
---
gdb/s390-tdep.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Index: src/gdb/s390-tdep.c
===================================================================
--- src.orig/gdb/s390-tdep.c 2010-08-04 18:48:44.000000000 +0100
+++ src/gdb/s390-tdep.c 2010-08-04 19:06:27.000000000 +0100
@@ -43,7 +43,7 @@
#include "dis-asm.h"
#include "solib-svr4.h"
#include "prologue-value.h"
-
+#include "linux-tdep.h"
#include "s390-tdep.h"
#include "features/s390-linux32.c"
@@ -2909,6 +2909,10 @@ s390_gdbarch_init (struct gdbarch_info i
displaced_step_at_entry_point);
set_gdbarch_max_insn_length (gdbarch, S390_MAX_INSTR_SIZE);
+ /* Note that GNU/Linux is the only OS supported on this
+ platform. */
+ linux_init_abi (info, gdbarch);
+
switch (tdep->abi)
{
case ABI_LINUX_S390: