public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* More on the Solaris 64 bit troubles
@ 2003-03-12  2:54 Mikhail Teterin
  2003-03-12 15:21 ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Mikhail Teterin @ 2003-03-12  2:54 UTC (permalink / raw)
  To: gdb

It happens when I try to use the 64-bit compiled gdb executable to debug
a 32-bit executable. I don't see why this should not work...

It dies, because when the second gdbarch structure is initialized
(don't why it does it twice) the set_gdbarch_num_regs is not called and
num_regs fields stays at the unitialized -1 :-(

Any clues? Thanks!

	-mi


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

* Re: More on the Solaris 64 bit troubles
  2003-03-12  2:54 More on the Solaris 64 bit troubles Mikhail Teterin
@ 2003-03-12 15:21 ` Andrew Cagney
  2003-03-12 15:27   ` Mikhail Teterin
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2003-03-12 15:21 UTC (permalink / raw)
  To: Mikhail Teterin; +Cc: gdb

> It happens when I try to use the 64-bit compiled gdb executable to debug
> a 32-bit executable. I don't see why this should not work...
> 
> It dies, because when the second gdbarch structure is initialized
> (don't why it does it twice) the set_gdbarch_num_regs is not called and
> num_regs fields stays at the unitialized -1 :-(

At present, on Solaris, the only way to debug a 32 bit executable is to 
build a 32 bit GDB.  GDB needs something (thread library?) and that only 
works when built/linked 32 bit on a 32 bit executable.

Andrew


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

* Re: More on the Solaris 64 bit troubles
  2003-03-12 15:21 ` Andrew Cagney
@ 2003-03-12 15:27   ` Mikhail Teterin
  2003-03-31  5:46     ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Mikhail Teterin @ 2003-03-12 15:27 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb

On Wednesday 12 March 2003 10:21 am, Andrew Cagney wrote:
= > It happens when I try to use the 64-bit compiled gdb executable to debug
= > a 32-bit executable. I don't see why this should not work...
= >
= > It dies, because when the second gdbarch structure is initialized
= > (don't why it does it twice) the set_gdbarch_num_regs is not called and
= > num_regs fields stays at the unitialized -1 :-(
=
= At present, on Solaris, the only way to debug a 32 bit executable is to
= build a 32 bit GDB.  GDB needs something (thread library?) and that only
= works when built/linked 32 bit on a 32 bit executable.

Thanks! I'll try that. Too bad, because all my Tcl (itcl, tix, etc.)
are built for 64-bit, so I'll have to build a standalone insight-only
distributions instead of sharing them.

However, it seems to be dying long before getting to the thread library.

While trying to use the second `struct gdbarch' -- why does it need more
than one anyway?

Also I have a bunch of patches for 5.3, which remove warnings raised by
the Solaris' compiler (and a couple of bugs uncovered through them).
Should I post them here, or send to someone directly?

	-mi

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

* Re: More on the Solaris 64 bit troubles
  2003-03-12 15:27   ` Mikhail Teterin
@ 2003-03-31  5:46     ` Andrew Cagney
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2003-03-31  5:46 UTC (permalink / raw)
  To: Mikhail Teterin; +Cc: gdb

> On Wednesday 12 March 2003 10:21 am, Andrew Cagney wrote:
> = > It happens when I try to use the 64-bit compiled gdb executable to debug
> = > a 32-bit executable. I don't see why this should not work...
> = >
> = > It dies, because when the second gdbarch structure is initialized
> = > (don't why it does it twice) the set_gdbarch_num_regs is not called and
> = > num_regs fields stays at the unitialized -1 :-(
> =
> = At present, on Solaris, the only way to debug a 32 bit executable is to
> = build a 32 bit GDB.  GDB needs something (thread library?) and that only
> = works when built/linked 32 bit on a 32 bit executable.
> 
> Thanks! I'll try that. Too bad, because all my Tcl (itcl, tix, etc.)
> are built for 64-bit, so I'll have to build a standalone insight-only
> distributions instead of sharing them.
> 
> However, it seems to be dying long before getting to the thread library.
> 
> While trying to use the second `struct gdbarch' -- why does it need more
> than one anyway?
> 
> Also I have a bunch of patches for 5.3, which remove warnings raised by
> the Solaris' compiler (and a couple of bugs uncovered through them).
> Should I post them here, or send to someone directly?

Hmm, an update.  I've been corrected.  Apparently 64 bit GDB:

	CFLAGS='-g -m64 -O' .../configure

is ment to be able to debug either a 32 or 64 bit binary, so there has 
been bit rot :-(

Andrew


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

end of thread, other threads:[~2003-03-31  5:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-12  2:54 More on the Solaris 64 bit troubles Mikhail Teterin
2003-03-12 15:21 ` Andrew Cagney
2003-03-12 15:27   ` Mikhail Teterin
2003-03-31  5:46     ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).