$ gdb a.out
GNU gdb (GDB) SUSE (7.1-3.12)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/a.out...done.(gdb) break 14
Breakpoint 1 at 0x4005c7: file x.c, line 14.
(gdb) run
Starting program: /tmp/a.out
... (some warning messages)
Count from 1 to 3
1
2
3
Breakpoint 1, main () at x.c:14
14 printf("Finished
");
(gdb) quit
On Tue, 12 Jul 2011 23:06:03 +0000, mostafaxxx wrote:
> the problem is i can’t set a break point in source code after a for loop
> for example the following code
Check to make sure you don’t have any extra blank lines in the actual
code - if it were me, I’d be inclined to try different line numbers and
see what works - and when you find something that works, look and see
what line of the code is and if it matches up.
On Thu, 14 Jul 2011 21:06:02 +0000, mostafaxxx wrote:
> using the gdb gui Insight
>
> [image: http://i53.tinypic.com/2l89c8g.jpg]
>
> as you can see from the screenshot i can’t set breakpoints on any thing
> after line 7
Try doing a verification on the gdb package - it sounds like something in
the package might be messed up.
On Thu, 14 Jul 2011 22:06:02 +0000, mostafaxxx wrote:
>> Try doing a verification on the gdb package - it sounds like something
>> in
>> the package might be messed up.
>
> that sounds very mush possible
> see ,i have built the Insight Debugger from source so it might indeed
> missed up the GDB pakages…
>
>
> any way how can verify the gdb package ??
well i got no output i guess that mean the package is fine
(RPM produces output only if there is a verification failure.)
# rpm -q gdb
gdb-7.2-3.3.i586
===============================================================================================================================
# rpm -qi gdb
Name : gdb Relocations: (not relocatable)
Version : 7.2 Vendor: openSUSE
Release : 3.3 Build Date: Wed 23 Feb 2011 12:40:36 AM EET
Install Date: Sat 30 Apr 2011 09:08:11 AM EEST Build Host: build21
Group : Development/Debuggers Source RPM: gdb-7.2-3.3.src.rpm
Size : 5189817 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain
Signature : RSA/8, Wed 23 Feb 2011 12:42:28 AM EET, Key ID b88b2fd43dbdc284
Packager : http://bugs.opensuse.org
URL : http://gnu.org/software/gdb/
Summary : A GNU source-level debugger for C, C++, Java and other languages
Description :
GDB, the GNU debugger, allows you to debug programs written in C, C++,
Java, and other languages, by executing them in a controlled fashion
and printing their data.
Distribution: openSUSE 11.4
================================================================================================================================
# rpm -qs gdb
normal /usr/bin/gcore
normal /usr/bin/gdb
normal /usr/bin/gdb-add-index
normal /usr/bin/gdbtui
normal /usr/bin/gstack
normal /usr/share/doc/packages/gdb
normal /usr/share/doc/packages/gdb/COPYING
normal /usr/share/doc/packages/gdb/COPYING.LIB
normal /usr/share/doc/packages/gdb/COPYING3
normal /usr/share/doc/packages/gdb/NEWS
normal /usr/share/doc/packages/gdb/README
normal /usr/share/gdb
normal /usr/share/gdb/python
normal /usr/share/gdb/python/gdb
normal /usr/share/gdb/python/gdb/FrameIterator.py
normal /usr/share/gdb/python/gdb/FrameWrapper.py
normal /usr/share/gdb/python/gdb/__init__.py
normal /usr/share/gdb/python/gdb/backtrace.py
normal /usr/share/gdb/python/gdb/command
normal /usr/share/gdb/python/gdb/command/__init__.py
normal /usr/share/gdb/python/gdb/command/alias.py
normal /usr/share/gdb/python/gdb/command/backtrace.py
normal /usr/share/gdb/python/gdb/command/ignore_errors.py
normal /usr/share/gdb/python/gdb/command/pahole.py
normal /usr/share/gdb/python/gdb/command/require.py
normal /usr/share/gdb/python/gdb/command/save_breakpoints.py
normal /usr/share/gdb/python/gdb/command/upto.py
normal /usr/share/gdb/python/gdb/function
normal /usr/share/gdb/python/gdb/function/__init__.py
normal /usr/share/gdb/python/gdb/function/caller_is.py
normal /usr/share/gdb/python/gdb/function/in_scope.py
normal /usr/share/gdb/syscalls
normal /usr/share/gdb/syscalls/amd64-linux.xml
normal /usr/share/gdb/syscalls/gdb-syscalls.dtd
normal /usr/share/gdb/syscalls/i386-linux.xml
normal /usr/share/gdb/syscalls/ppc-linux.xml
normal /usr/share/gdb/syscalls/ppc64-linux.xml
normal /usr/share/gdb/syscalls/sparc-linux.xml
normal /usr/share/gdb/syscalls/sparc64-linux.xml
normal /usr/share/info/annotate.info.gz
normal /usr/share/info/gdb.info.gz
normal /usr/share/info/gdbint.info.gz
normal /usr/share/info/stabs.info.gz
normal /usr/share/man/man1/gdb.1.gz
normal /usr/share/man/man1/gdbtui.1.gz
normal /usr/share/man/man1/gstack.1.gz
================================================================================================================================
# rpm -V gdb