Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* "failed to find valid object file", but which object file? (using  static libraries)
@ 2007-06-26  8:47 Bram Kuijper
  2007-06-26  8:55 ` Ramana Radhakrishnan
  2007-06-26 11:22 ` Daniel Jacobowitz
  0 siblings, 2 replies; 8+ messages in thread
From: Bram Kuijper @ 2007-06-26  8:47 UTC (permalink / raw)
  To: gdb

Hi all,

as a newbie, I am debugging a program which uses a number of self-made 
static libraries. When running (gdb) start, the first message I get is:

Failed to read a valid object file image from memory.
0x08048d15 in main ()

Is there any way to find _which_ object file has failed to be read in?

A simple ldd ./program will only give me a listing of standard linux 
shared libraries, whereas no static libraries are displayed (I presume 
the error is in one of my self-made static libraries).

Can one point to more information with which program I can find out 
which static libraries are included?

thanks in advance,

Bram




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

* Re: "failed to find valid object file", but which object file?  (using  static libraries)
  2007-06-26  8:47 "failed to find valid object file", but which object file? (using static libraries) Bram Kuijper
@ 2007-06-26  8:55 ` Ramana Radhakrishnan
  2007-06-26 11:22 ` Daniel Jacobowitz
  1 sibling, 0 replies; 8+ messages in thread
From: Ramana Radhakrishnan @ 2007-06-26  8:55 UTC (permalink / raw)
  To: Bram Kuijper; +Cc: gdb

On Tue, 2007-06-26 at 10:47 +0200, Bram Kuijper wrote:
> Hi all,
> 
> as a newbie, I am debugging a program which uses a number of self-made 
> static libraries. When running (gdb) start, the first message I get is:
> 
> Failed to read a valid object file image from memory.
> 0x08048d15 in main ()
> 
> Is there any way to find _which_ object file has failed to be read in?
> 
> A simple ldd ./program will only give me a listing of standard linux 
> shared libraries, whereas no static libraries are displayed (I presume 
> the error is in one of my self-made static libraries).


Could you give more information regarding the version of gdb being used,
for which architecture and a small test case for the same ? Also the set
of commands that you give to launch gdb so that you get the error would
be most useful.


cheers
-Ramana

> 
> Can one point to more information with which program I can find out 
> which static libraries are included?
> 
> thanks in advance,
> 
> Bram
> 
> 

-- 
cheers
Ramana

Ramana Radhakrishnan
IDE & Tools Group
Celunite Inc (www.celunite.com)



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

* Re: "failed to find valid object file", but which object file?  (using  static libraries)
  2007-06-26  8:47 "failed to find valid object file", but which object file? (using static libraries) Bram Kuijper
  2007-06-26  8:55 ` Ramana Radhakrishnan
@ 2007-06-26 11:22 ` Daniel Jacobowitz
  2007-06-26 11:32   ` Bram Kuijper
  1 sibling, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2007-06-26 11:22 UTC (permalink / raw)
  To: Bram Kuijper; +Cc: gdb

On Tue, Jun 26, 2007 at 10:47:12AM +0200, Bram Kuijper wrote:
> Hi all,
> 
> as a newbie, I am debugging a program which uses a number of self-made static 
> libraries. When running (gdb) start, the first message I get is:
> 
> Failed to read a valid object file image from memory.
> 0x08048d15 in main ()
> 
> Is there any way to find _which_ object file has failed to be read in?

One from memory, not from disk.  Usually this will be linux-gate.so.1
or something like that; a virtual DSO provided by the kernel.

I'm not sure why it would fail.  What platform and kernel version?

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: "failed to find valid object file", but which object file?  (using   static libraries)
  2007-06-26 11:22 ` Daniel Jacobowitz
@ 2007-06-26 11:32   ` Bram Kuijper
  2007-06-26 11:37     ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Bram Kuijper @ 2007-06-26 11:32 UTC (permalink / raw)
  To: Bram Kuijper, gdb

Daniel Jacobowitz wrote:
> On Tue, Jun 26, 2007 at 10:47:12AM +0200, Bram Kuijper wrote:
>> Is there any way to find _which_ object file has failed to be read in?
> 
> One from memory, not from disk.  Usually this will be linux-gate.so.1
> or something like that; a virtual DSO provided by the kernel.
> 
> I'm not sure why it would fail.  What platform and kernel version?
> 

Ubuntu Gutsy Gibbon, 2.6.22-6-generic i686 GNU/Linux.

Since Gutsy Gibbon is still in beta, it might be indeed the cause of all 
trouble. Should I downgrade to a previous kernel version or is there any 
other solution?

by the way,
ldd ./program gives:
         linux-gate.so.1 =>  (0xffffe000)
         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7de1000)
         libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7dba000)
         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7dae000)
         libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7c6a000)
         /lib/ld-linux.so.2 (0xb7eec000)


thanks,
Bram


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

* Re: "failed to find valid object file", but which object file?  (using   static libraries)
  2007-06-26 11:32   ` Bram Kuijper
@ 2007-06-26 11:37     ` Daniel Jacobowitz
  2007-06-26 11:52       ` Bram Kuijper
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2007-06-26 11:37 UTC (permalink / raw)
  To: Bram Kuijper; +Cc: gdb

On Tue, Jun 26, 2007 at 01:32:23PM +0200, Bram Kuijper wrote:
> Daniel Jacobowitz wrote:
> > On Tue, Jun 26, 2007 at 10:47:12AM +0200, Bram Kuijper wrote:
> >> Is there any way to find _which_ object file has failed to be read in?
> > One from memory, not from disk.  Usually this will be linux-gate.so.1
> > or something like that; a virtual DSO provided by the kernel.
> > I'm not sure why it would fail.  What platform and kernel version?
> 
> Ubuntu Gutsy Gibbon, 2.6.22-6-generic i686 GNU/Linux.
> 
> Since Gutsy Gibbon is still in beta, it might be indeed the cause of all 
> trouble. Should I downgrade to a previous kernel version or is there any other 
> solution?

No, you should figure out why GDB has failed :-)  You'd have to debug
it, though.  The error message indicates that either reading from
memory has failed or else the image found there was surprising
somehow.  If you run with "set debug target 1", do any errors show up?

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: "failed to find valid object file", but which object file?  (using    static libraries)
  2007-06-26 11:37     ` Daniel Jacobowitz
@ 2007-06-26 11:52       ` Bram Kuijper
  2007-06-26 12:11         ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Bram Kuijper @ 2007-06-26 11:52 UTC (permalink / raw)
  To: Bram Kuijper, gdb

> 
> No, you should figure out why GDB has failed :-)  You'd have to debug
> it, though.  The error message indicates that either reading from
> memory has failed or else the image found there was surprising
> somehow.  If you run with "set debug target 1", do any errors show up?
> 

it was quite some output, so I put it on pastebin.com:

http://pastebin.com/936686

thanks,
Bram


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

* Re: "failed to find valid object file", but which object file?  (using    static libraries)
  2007-06-26 11:52       ` Bram Kuijper
@ 2007-06-26 12:11         ` Daniel Jacobowitz
  2007-06-26 14:52           ` Bram Kuijper
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2007-06-26 12:11 UTC (permalink / raw)
  To: Bram Kuijper; +Cc: gdb

On Tue, Jun 26, 2007 at 01:51:58PM +0200, Bram Kuijper wrote:
> > No, you should figure out why GDB has failed :-)  You'd have to debug
> > it, though.  The error message indicates that either reading from
> > memory has failed or else the image found there was surprising
> > somehow.  If you run with "set debug target 1", do any errors show up?
> 
> it was quite some output, so I put it on pastebin.com:
> 
> http://pastebin.com/936686


child:target_xfer_partial (1, (null), 0xbff40994,  0x0,  0xffffe000, 52) = -1
target_terminal_ours ()
Failed to read a valid object file image from memory.

0xffffe000 is the traditional address of the vDSO.  I don't know why
you couldn't read from it; you may wish to report this to Ubuntu.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: "failed to find valid object file", but which object file?  (using     static libraries)
  2007-06-26 12:11         ` Daniel Jacobowitz
@ 2007-06-26 14:52           ` Bram Kuijper
  0 siblings, 0 replies; 8+ messages in thread
From: Bram Kuijper @ 2007-06-26 14:52 UTC (permalink / raw)
  To: Bram Kuijper, gdb

Filed a bug, see what comes from it.

https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/122314

Daniel Jacobowitz wrote:
> On Tue, Jun 26, 2007 at 01:51:58PM +0200, Bram Kuijper wrote:
>>> No, you should figure out why GDB has failed :-)  You'd have to debug
>>> it, though.  The error message indicates that either reading from
>>> memory has failed or else the image found there was surprising
>>> somehow.  If you run with "set debug target 1", do any errors show up?
>> it was quite some output, so I put it on pastebin.com:
>>
>> http://pastebin.com/936686
> 
> 
> child:target_xfer_partial (1, (null), 0xbff40994,  0x0,  0xffffe000, 52) = -1
> target_terminal_ours ()
> Failed to read a valid object file image from memory.
> 
> 0xffffe000 is the traditional address of the vDSO.  I don't know why
> you couldn't read from it; you may wish to report this to Ubuntu.
> 


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

end of thread, other threads:[~2007-06-26 14:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-26  8:47 "failed to find valid object file", but which object file? (using static libraries) Bram Kuijper
2007-06-26  8:55 ` Ramana Radhakrishnan
2007-06-26 11:22 ` Daniel Jacobowitz
2007-06-26 11:32   ` Bram Kuijper
2007-06-26 11:37     ` Daniel Jacobowitz
2007-06-26 11:52       ` Bram Kuijper
2007-06-26 12:11         ` Daniel Jacobowitz
2007-06-26 14:52           ` Bram Kuijper

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