public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "mforce2 at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/14031] New: can't get gdb to break on printf
Date: Sat, 28 Apr 2012 14:08:00 -0000	[thread overview]
Message-ID: <bug-14031-4717@http.sourceware.org/bugzilla/> (raw)

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.


             reply	other threads:[~2012-04-28 14:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-28 14:08 mforce2 at gmail dot com [this message]
2012-04-28 14:13 ` [Bug breakpoints/14031] " mforce2 at gmail dot com
2012-04-28 14:54 ` schwab@linux-m68k.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-14031-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).