public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "marc.khouzam at ericsson dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/16465] New: -dprintf-insert does not store the string for pending dprintf
Date: Sat, 18 Jan 2014 22:29:00 -0000	[thread overview]
Message-ID: <bug-16465-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=16465

            Bug ID: 16465
           Summary: -dprintf-insert does not store the string for pending
                    dprintf
           Product: gdb
           Version: 7.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
          Assignee: unassigned at sourceware dot org
          Reporter: marc.khouzam at ericsson dot com

Bug 15292 fixed pending dprintf for the CLI, but it seems they don't work
properly for the MI interface.   What seems to happen is that the string to
print does not get stored so when the dprintf gets activated, it has nothing to
print.

Below is a session that compares pending dprintf using the CLI vs MI
interfaces:

> gdb.7.7 ~/runtime-TestDSF/myapp/Debug/myapp.exe
GNU gdb (GDB) 7.7.50.20140110-cvs
(gdb)  interpreter-exec mi "-dprintf-insert -f mydll.c:1 \"hello\""
&"No source file named mydll.c.\n"
^done,bkpt={number="1",type="dprintf",disp="keep",enabled="y",addr="<PENDING>",pending="mydll.c:1",times="0",original-location="mydll.c:1"}
(gdb) dprintf mydll.c:2,"hello"
No source file named mydll.c.
Make dprintf pending on future shared library load? (y or [n]) y
Dprintf 2 (mydll.c:2,"hello") pending.
(gdb) info b
Num     Type           Disp Enb Address    What
1       dprintf        keep y   <PENDING>  mydll.c:1
2       dprintf        keep y   <PENDING>  mydll.c:2,"hello"
(gdb) b 18
Breakpoint 3 at 0x400754: file ../src/myapp.c, line 18.
(gdb) r
Starting program: /home/lmckhou/runtime-TestDSF/myapp/Debug/myapp.exe 

Breakpoint 3, main () at ../src/myapp.c:18
18           handle =
dlopen("/home/lmckhou/runtime-TestDSF/myLinuxDll/Debug/libmyLinuxDll",
RTLD_LAZY);
(gdb) n
Error in re-setting breakpoint 1: Format string required
19           if (!handle) {
(gdb) inf b
Num     Type           Disp Enb Address            What
1       dprintf        keep y   0x00007ffff7633560 in foo at ../src/mydll.c:1
2       dprintf        keep y   0x00007ffff7633560 in foo at ../src/mydll.c:2
        printf "hello"
3       breakpoint     keep y   0x0000000000400754 in main at ../src/myapp.c:18
        breakpoint already hit 1 time

-- 
You are receiving this mail because:
You are on the CC list for the bug.


             reply	other threads:[~2014-01-18 22:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-18 22:29 marc.khouzam at ericsson dot com [this message]
2014-01-18 22:30 ` [Bug breakpoints/16465] " marc.khouzam at ericsson dot com
2015-03-26 15:49 ` antoine.tremblay at ericsson dot com
2015-06-12 12:49 ` cvs-commit at gcc dot gnu.org
2015-06-12 12:53 ` antoine.tremblay at ericsson dot com

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-16465-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).