View topic - please help a gdb newbie

please help a gdb newbie

anything that doesn't fit to other groups.

please help a gdb newbie

Postby mirtch » Tue Jul 15, 2003 10:16 am

i have these lines of code and want them to be debugged via gdb:

#include <stdlib.h>
#include <stdio.h>

int main(int argc, char *argv[]) {
printf("Welcome to the Momentics IDE\n");
return EXIT_SUCCESS;
}

here's my gdb session:

bash-2.05a# gdb bla_g
GNU gdb 5.2.1qnx-326 QNX Neutrino 6.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "ntox86"...
(gdb) b main
Breakpoint 1 at 0x80483ea: file /root/workspace/bla/bla.c, line 5.
(gdb) run
Starting program: /root/workspace/bla/x86/o-g/bla_g
(gdb) n
Cannot find bounds of current function
(gdb) bt
#0 0xb032d87d in ?? ()
(gdb)

why gdb doesn't stop at the defined breakpoint? what's wrong? (on other platforms all this works as expected)

thanks!
mirtch
Active Member
 
Posts: 26
Joined: Wed Mar 26, 2003 7:18 am

Postby vishwa2000 » Tue Jul 15, 2003 11:32 am

I have also noticed this problem. The workaround, I have found and have been following, is after giving 'run' command, give 'c' command and it breaks at the first breakpoint. After this you can start using 'n'.

-Vish.
vishwa2000
Active Member
 
Posts: 25
Joined: Thu Jun 26, 2003 6:49 am
Location: Bangalore, INDIA

Postby cdm » Tue Jul 15, 2003 5:44 pm

We do a two step startup - run and then continue.
cdm
QNX Master
 
Posts: 789
Joined: Fri Jul 05, 2002 9:38 am


Return to General Programming

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron