This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/14031] New: can't get gdb to break on printf
- From: "mforce2 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sat, 28 Apr 2012 14:07:48 +0000
- Subject: [Bug breakpoints/14031] New: can't get gdb to break on printf
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14031
Bug #: 14031
Summary: can't get gdb to break on printf
Product: gdb
Version: 7.4
Status: NEW
Severity: normal
Priority: P2
Component: breakpoints
AssignedTo: unassigned@sourceware.org
ReportedBy: mforce2@gmail.com
Classification: Unclassified
I'm using gdb 7.4.1 on a less known distribution, Frugalware. When trying to
set a breakpoint on a compiled program for printf it just fails and doesn't
stop.
Kernel is :
Linux frugalware 3.3-fw4 #1 SMP PREEMPT Mon Apr 23 02:41:52 CEST 2012 x86_64
GNU/Linux
Glibc is : 2.15 ( tested with 2.14.1 and same result ) and gcc is 4.7.
Here is what gdb says when it starts:
GNU gdb (GDB) 7.4.1
.................
This GDB was configured as "x86_64-frugalware-linux".
Program is this small test one:
#include <stdio.h>
using namespace std;
int main()
{
printf("we have a printf\n");
return 0;
}
and it was compiled with : g++ -ggdb3 -o test main.cpp
It works to set a breakpoint in for main but when trying to set one for printf
I get:
(gdb) break printf
Function "printf" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (printf) pending.
(gdb) run
Starting program: /home/marius/proj/mariustry/test
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Hello World!
and a printf
[Inferior 1 (process 1992) exited normally]
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.