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

Re: GDB problems



I know know the local frames for this app are kept fairly small (less
than 10k total unless there is recursion, which we check for). Also note
that even if I set a breakpoint at main(), I hit the SIGTRAP before the breakpoint.

Chris

Fuxin Zhang wrote:
> 
> hi,
>    My statements was not quit exact: the problem we met was
> that when we use a > 16M local array,then the stack would be
> messed up,even gdb can't reach main(). But we met it on x86,
> for mips the number may be different,you can ask some mips
> toolchain experts for it.
> 
> Chris Plummer wrote:
> 
> >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: