Naubert,

Try removing the 'gdbS' Feature as one of the first thing your application
does.  That way, your application will break the first time, but not
subsequent times.

There may be a problem with this approach, as that initial break into gdb
also communicates to gdb crucial information about your application.  That
information could change between invocations of your application, so it's
possible that gdb may get out-of-sync with the actual state of the device.

You might also try to modify gdb so that it doesn't break at the start of
the application.  Find the following lines in remote-palmos.c:

            if ((get_short(buf+State_exception) == 40 *4) &&
                (get_long(buf+State_D3) == 0x12BEEF34)) {

#if 0
              puts_filtered ("Got target position.\n");
#endif
              text_addr = get_long(buf+State_D0);
              bss_addr =  get_long(buf+State_D1);
              data_addr = get_long(buf+State_D2);
              remote_insert_wbreakpoint(get_long(buf+State_A0) + 4);
              get_offsets();
              remote_resume(0,0,TARGET_SIGNAL_0);
              stop_soon_quietly = 0;
              continue;
            }

Removing the call to remote_insert_wbreakpoint will remove the facility that
causes your application to break at the start of the application.

Or perhaps you'd like to modify the code in gdbstub.c that communicates the
crucial information to gdb:

       lea PilotMain(%%pc),%%a0
       move.l #0x12BEEF34, %%d3
       trap #8

Create a dummy function in your application called PilotMain2, and modify
the above assembly to refer to it.  This will cause gdb to put the
breakpoint on PilotMain2 instead of PilotMain.

-- Keith


-----Original Message-----
From: Naubert Aparicio [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25, 2001 7:21 PM
To: Palm Developer Forum
Subject: GDB, POSE Gremlins & Application Start SIGTRAP?



Hello.

To test an application I want to be able to run gremlins with GDB activated
so that it stops only when a bug is encountered.  However, the -g option in
gcc forces a SIGTRAP at the beginning of the program which causes that some
gremlin events that switches out the application will eventually stop at the
start again.  Is there any way to avoid this behaviour and eliminate the
start SIGTRAP only while using -g and symbolic debugging at the same time?.

Thanks,

Naubert

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to