[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GDB problems




Fuxin Zhang wrote:
> 
> Chris Plummer wrote:
> 
 <snip>
> >(gdb) run
> >Starting program: /usr/bin/testapp
> >[New Thread 1024 (LWP 18281)]
> >
> >Program received signal SIGTRAP, Trace/breakpoint trap.
> >[Switching to Thread 1024 (LWP 18281)]
> >warning: Warning: GDB can't find the start of the function at 0xffffffff.
 <snip>
> >0xffffffff in ?? ()
> >(gdb) bt
> >#0  0xffffffff in ?? ()
> >#1  0x2aab73c8 in _dl_init () from /lib/ld.so.1
> >Cannot access memory at address 0x38
> >(gdb) p $pc
> >$1 = -1
> >(gdb)
> >
> This can happen if you have a large static/global array which can't be
> satisfied

There's definitely a lot of global data and a few large stuctures,
including some arrays. The largest is a struct in the .bss section which
is about 170k and includes, among other things, a 3000 element array of
4-word structs.

Can you clarify if this is only a problem with arrays or structs also
(and does that include arrays embedded in a struct). Also, how big is
too big?

Can you also explain what "can't be satisfied" means. Is this mememory
related? I have a 192mb RAM + 256mb swap in this Indy. Is there anything
I can do to work around this problem, other than making some of the
arrays/structs smaller.

I should also add that gdb doesn't have a problem with this app on other
platforms (linux-arm, linux-ppc, linux-x86), although none of these
other platforms is running Debian.

Chris



Reply to: