Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: question about GDB message
       [not found] <6b14b5b00709242126n5321100m2aad74fd7c7ea58d@mail.gmail.com>
@ 2007-09-25 11:05 ` The Westlakers
  2007-09-25 11:41   ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: The Westlakers @ 2007-09-25 11:05 UTC (permalink / raw)
  To: gdb; +Cc: westlakers

Hi GDB experts,

I am having problem when I made "target remote:192.1.1.255:6000"
I can see the packets being sent to the remote target machine, and replied

with right reponding packets. But after that, it prints out:

procfs: couldn't find pid 42000 in procinfo list.

then can not do anything from there.

I am running 64bit Solaris on Sparc and my targt is also UltraSparc N1 machine

w/o OS (though implementing our own runtime).

The whole process was better if I run 32-bit GDB, I can get as far as
"info thread"
and "info reg" etc, can get back the info for the register files and
the threads.


Any help is much appreciated.

Thanks
Jesse


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

* Re: question about GDB message
  2007-09-25 11:05 ` question about GDB message The Westlakers
@ 2007-09-25 11:41   ` Daniel Jacobowitz
  2007-09-25 11:48     ` The Westlakers
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2007-09-25 11:41 UTC (permalink / raw)
  To: The Westlakers; +Cc: gdb

On Tue, Sep 25, 2007 at 12:28:40PM +0800, The Westlakers wrote:
> Hi GDB experts,
> 
> I am having problem when I made "target remote:192.1.1.255:6000"
> I can see the packets being sent to the remote target machine, and replied
> 
> with right reponding packets. But after that, it prints out:
> 
> procfs: couldn't find pid 42000 in procinfo list.
> 
> then can not do anything from there.

How did you configure GDB?  It should probably be sparc64-elf if you
are connecting to a no-OS target.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: question about GDB message
  2007-09-25 11:41   ` Daniel Jacobowitz
@ 2007-09-25 11:48     ` The Westlakers
  2007-09-25 12:27       ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: The Westlakers @ 2007-09-25 11:48 UTC (permalink / raw)
  To: The Westlakers, gdb

On 9/25/07, Daniel Jacobowitz <drow@false.org> wrote:
> On Tue, Sep 25, 2007 at 12:28:40PM +0800, The Westlakers wrote:
> > Hi GDB experts,
> >
> > I am having problem when I made "target remote:192.1.1.255:6000"
> > I can see the packets being sent to the remote target machine, and replied
> >
> > with right reponding packets. But after that, it prints out:
> >
> > procfs: couldn't find pid 42000 in procinfo list.
> >
> > then can not do anything from there.
>
> How did you configure GDB?  It should probably be sparc64-elf if you
> are connecting to a no-OS target.
>

Yes, it is 64 bit ELF. just run gdb on Solaris host and typed the remote target
command.

1) I can run 32-bit GDB to get reg file and thread info from the
target, even if
the image running in the target is 64-bit, I managed to talk in 32-bit.

2) However when run 64-bit GDB, I got the procfs problem.

Why GDB 64-bit needs procfs?

> --
> Daniel Jacobowitz
> CodeSourcery
>


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

* Re: question about GDB message
  2007-09-25 11:48     ` The Westlakers
@ 2007-09-25 12:27       ` Daniel Jacobowitz
  2007-09-25 12:35         ` The Westlakers
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2007-09-25 12:27 UTC (permalink / raw)
  To: The Westlakers; +Cc: gdb

On Tue, Sep 25, 2007 at 04:41:54AM -0700, The Westlakers wrote:
> > How did you configure GDB?  It should probably be sparc64-elf if you
> > are connecting to a no-OS target.
> >
> 
> Yes, it is 64 bit ELF. just run gdb on Solaris host and typed the remote target
> command.

No, that is not what I said.  You should build GDB and specify a
sparc64-elf --target.

Using target remote from a native GDB is supposed to work, but does
not always.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: question about GDB message
  2007-09-25 12:27       ` Daniel Jacobowitz
@ 2007-09-25 12:35         ` The Westlakers
  2007-09-25 14:10           ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: The Westlakers @ 2007-09-25 12:35 UTC (permalink / raw)
  To: The Westlakers, gdb

On 9/25/07, Daniel Jacobowitz <drow@false.org> wrote:
> On Tue, Sep 25, 2007 at 04:41:54AM -0700, The Westlakers wrote:
> > > How did you configure GDB?  It should probably be sparc64-elf if you
> > > are connecting to a no-OS target.
> > >
> >
> > Yes, it is 64 bit ELF. just run gdb on Solaris host and typed the remote target
> > command.
>
> No, that is not what I said.  You should build GDB and specify a
> sparc64-elf --target.
>
> Using target remote from a native GDB is supposed to work, but does
> not always.

So I did this:

./configure --target=sparc64-elf, is this right? the resulting GDB
becomes 32-bit app
and it can talk to the target in 32-mode, but not 64-bit.

Maybe you could help to make sure I configured it right.

thanks
>
> --
> Daniel Jacobowitz
> CodeSourcery
>


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

* Re: question about GDB message
  2007-09-25 12:35         ` The Westlakers
@ 2007-09-25 14:10           ` Daniel Jacobowitz
  2007-09-25 16:03             ` The Westlakers
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2007-09-25 14:10 UTC (permalink / raw)
  To: The Westlakers; +Cc: gdb

On Tue, Sep 25, 2007 at 05:27:13AM -0700, The Westlakers wrote:
> So I did this:
> 
> ./configure --target=sparc64-elf, is this right? the resulting GDB
> becomes 32-bit app
> and it can talk to the target in 32-mode, but not 64-bit.
> 
> Maybe you could help to make sure I configured it right.

That's right.  It shouldn't matter that the GDB is 32-bit.  What goes
wrong talking to a 64-bit target?

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: question about GDB message
  2007-09-25 14:10           ` Daniel Jacobowitz
@ 2007-09-25 16:03             ` The Westlakers
  2007-09-25 16:31               ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: The Westlakers @ 2007-09-25 16:03 UTC (permalink / raw)
  To: The Westlakers, gdb

On 9/25/07, Daniel Jacobowitz <drow@false.org> wrote:
> On Tue, Sep 25, 2007 at 05:27:13AM -0700, The Westlakers wrote:
> > So I did this:
> >
> > ./configure --target=sparc64-elf, is this right? the resulting GDB
> > becomes 32-bit app
> > and it can talk to the target in 32-mode, but not 64-bit.
> >
> > Maybe you could help to make sure I configured it right.
>
> That's right.  It shouldn't matter that the GDB is 32-bit.  What goes
> wrong talking to a 64-bit target?

when GDB issues 'g' packet to the target, the target returns all reg
values in 64-bit,
but the GDB interprets it as 32-bit, so 'info reg' will not show
correct register values.
if the target returns in 32-bit values, then info reg can display all
values correctly.

do not know what is wrong.

thanks
>
> --
> Daniel Jacobowitz
> CodeSourcery
>


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

* Re: question about GDB message
  2007-09-25 16:03             ` The Westlakers
@ 2007-09-25 16:31               ` Daniel Jacobowitz
  2007-09-25 16:38                 ` The Westlakers
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2007-09-25 16:31 UTC (permalink / raw)
  To: The Westlakers; +Cc: gdb

On Tue, Sep 25, 2007 at 08:57:47AM -0700, The Westlakers wrote:
> > That's right.  It shouldn't matter that the GDB is 32-bit.  What goes
> > wrong talking to a 64-bit target?
> 
> when GDB issues 'g' packet to the target, the target returns all reg
> values in 64-bit,
> but the GDB interprets it as 32-bit, so 'info reg' will not show
> correct register values.
> if the target returns in 32-bit values, then info reg can display all
> values correctly.

Did you load a 64-bit file into GDB so that it knows you are debugging
a 64-bit image?

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: question about GDB message
  2007-09-25 16:31               ` Daniel Jacobowitz
@ 2007-09-25 16:38                 ` The Westlakers
  2007-09-25 16:45                   ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: The Westlakers @ 2007-09-25 16:38 UTC (permalink / raw)
  To: The Westlakers, gdb

>
> Did you load a 64-bit file into GDB so that it knows you are debugging
> a 64-bit image?
>
I am not sure if GDB gets it or not, I typed "gdb main", main is my
64-bit ELF image. 'info reg' can display correctly with the pc address
along with its symbol too.


> --
> Daniel Jacobowitz
> CodeSourcery
>


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

* Re: question about GDB message
  2007-09-25 16:38                 ` The Westlakers
@ 2007-09-25 16:45                   ` Daniel Jacobowitz
  2007-09-25 16:54                     ` The Westlakers
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2007-09-25 16:45 UTC (permalink / raw)
  To: The Westlakers; +Cc: gdb

On Tue, Sep 25, 2007 at 09:30:57AM -0700, The Westlakers wrote:
> >
> > Did you load a 64-bit file into GDB so that it knows you are debugging
> > a 64-bit image?
> >
> I am not sure if GDB gets it or not, I typed "gdb main", main is my
> 64-bit ELF image. 'info reg' can display correctly with the pc address
> along with its symbol too.

Then I'm out of ideas.  Sorry.

Looking at the source code, it looks to me like there is no support
for 64-bit bare ELF binaries on SPARC; only Linux / Solaris / BSD
binaries.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: question about GDB message
  2007-09-25 16:45                   ` Daniel Jacobowitz
@ 2007-09-25 16:54                     ` The Westlakers
  2007-09-25 17:22                       ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: The Westlakers @ 2007-09-25 16:54 UTC (permalink / raw)
  To: The Westlakers, gdb

On 9/25/07, Daniel Jacobowitz <drow@false.org> wrote:
> On Tue, Sep 25, 2007 at 09:30:57AM -0700, The Westlakers wrote:
> > >
> > > Did you load a 64-bit file into GDB so that it knows you are debugging
> > > a 64-bit image?
> > >
> > I am not sure if GDB gets it or not, I typed "gdb main", main is my
> > 64-bit ELF image. 'info reg' can display correctly with the pc address
> > along with its symbol too.
>
> Then I'm out of ideas.  Sorry.
thanks so much for your great help! I love GNU and its folks!
>
> Looking at the source code, it looks to me like there is no support
> for 64-bit bare ELF binaries on SPARC; only Linux / Solaris / BSD
> binaries.
any idea how much work to be done to support it? I may be able to do it
along with my current GDB support for Ultra Sparc N1 and N2.


>
> --
> Daniel Jacobowitz
> CodeSourcery
>


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

* Re: question about GDB message
  2007-09-25 16:54                     ` The Westlakers
@ 2007-09-25 17:22                       ` Daniel Jacobowitz
  0 siblings, 0 replies; 12+ messages in thread
From: Daniel Jacobowitz @ 2007-09-25 17:22 UTC (permalink / raw)
  To: The Westlakers; +Cc: gdb

On Tue, Sep 25, 2007 at 09:45:28AM -0700, The Westlakers wrote:
> > Looking at the source code, it looks to me like there is no support
> > for 64-bit bare ELF binaries on SPARC; only Linux / Solaris / BSD
> > binaries.
> any idea how much work to be done to support it? I may be able to do it
> along with my current GDB support for Ultra Sparc N1 and N2.

It should not be a lot of work; it's a little tricky to do it without
breaking other configurations though.  Take a look at sparc64_init_abi
and its current callers.

Something as simple as this might work, but no promises:

  gdbarch_register_osabi (bfd_arch_sparc, bfd_mach_sparc_v9,
                          GDB_OSABI_UNKNOWN, sparc64_init_abi);


-- 
Daniel Jacobowitz
CodeSourcery


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

end of thread, other threads:[~2007-09-25 16:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <6b14b5b00709242126n5321100m2aad74fd7c7ea58d@mail.gmail.com>
2007-09-25 11:05 ` question about GDB message The Westlakers
2007-09-25 11:41   ` Daniel Jacobowitz
2007-09-25 11:48     ` The Westlakers
2007-09-25 12:27       ` Daniel Jacobowitz
2007-09-25 12:35         ` The Westlakers
2007-09-25 14:10           ` Daniel Jacobowitz
2007-09-25 16:03             ` The Westlakers
2007-09-25 16:31               ` Daniel Jacobowitz
2007-09-25 16:38                 ` The Westlakers
2007-09-25 16:45                   ` Daniel Jacobowitz
2007-09-25 16:54                     ` The Westlakers
2007-09-25 17:22                       ` Daniel Jacobowitz

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