l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
November 4: Social gathering
Next Installfest:
TBD
Latest News:
Oct. 10: LUGOD Installfests coming again soon
Page last updated:
2002 Sep 20 11:58

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] gdb: until doesn't work as advertised?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] gdb: until doesn't work as advertised?



argh.   this could get confusing...  let me try again:


p@satan% gdb until_demo
gdb: Symbol `emacs_ctlx_keymap' has different size in shared object,
consider re-linking
(gdb) break 9
Breakpoint 1 at 0x8048420: file until_demo.c, line 9.
(gdb) l
1       #include <stdio.h>
2
3       int main(void)
4       {
5               int i=0, j=0;
6               scanf("%d", &i);
7
8               while (i) {
9                       i--;
10                      j++;
(gdb) commands
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just "end".
>printf "i is %d\n", i
>end
(gdb) run
Starting program: /home/p/writing/ddd/src/until_demo 
10

Breakpoint 1, main () at until_demo.c:9
9                       i--;
i is 10
(gdb) until
10                      j++;
(gdb) until
11              }
(gdb) until

Breakpoint 1, main () at until_demo.c:9
9                       i--;
i is 9
(gdb) until
10                      j++;
(gdb) until
11              }
(gdb) until

Breakpoint 1, main () at until_demo.c:9
9                       i--;
i is 8
(gdb) until
10                      j++;
(gdb) until
11              }
(gdb) until

Breakpoint 1, main () at until_demo.c:9
9                       i--;
i is 7
(gdb) until
10                      j++;
(gdb) until
11              }
(gdb) until

Breakpoint 1, main () at until_demo.c:9
9                       i--;
i is 6
(gdb) until
10                      j++;
(gdb) until
11              }
(gdb) until

Breakpoint 1, main () at until_demo.c:9
9                       i--;
i is 5


_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.