From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23789 invoked by alias); 5 May 2013 22:31:47 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 23758 invoked by uid 48); 5 May 2013 22:31:47 -0000 From: "marc.khouzam at ericsson dot com" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/15433] New: GDB crashes when using agent dprintf, %s format, and an in-line string Date: Sun, 05 May 2013 22:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marc.khouzam at ericsson dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-q2/txt/msg00186.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15433 Bug #: 15433 Summary: GDB crashes when using agent dprintf, %s format, and an in-line string Product: gdb Version: 7.5 Status: NEW Severity: normal Priority: P2 Component: breakpoints AssignedTo: unassigned@sourceware.org ReportedBy: marc.khouzam@ericsson.com Classification: Unclassified If I use the agent dprintf and use a %s in the dprintf string, and use an in-line string, GDB crashes (apparently when it reaches the dprintf). The dprintf format is something like dprintf 8,"s is %s\n","hello" This happens in both GDB 7.5 and 7.6. It is kind of a corner case, but the Eclipse support for dprintf happens to hit it often. This is because I want to use this in-line string format as a default dprintf string in Eclipse; the idea is to show the user that the % format is supported. So by default, I wanted eclipse to use dprintf myFile:100,"hit line %d of file %s\n",100,"myFile" Session followed by backtrace: GNU gdb (GDB) 7.6 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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-unknown-linux-gnu". For bug reporting instructions, please see: . (gdb) file /home/lmckhou/loopfirst Reading symbols from /home/lmckhou/loopfirst...done. (gdb) l 1 #include 2 #include 3 4 int main() { 5 int max = 90; 6 for (int i=0;i, gdbarch=) at ../../gdb/remote.c:8054 #2 0x00000000004a7b33 in remote_add_target_side_commands (buf=0xd567a9 ",1;cmds:1,", bp_tgt=0xd2ddf0, gdbarch=) at ../../gdb/remote.c:8040 #3 remote_insert_breakpoint (gdbarch=0xd0bba0, bp_tgt=0xd2ddf0) at ../../gdb/remote.c:8102 #4 0x000000000051e268 in insert_bp_location (bl=0xd2dd60, tmp_error_stream=0xd36020, disabled_breaks=0x7fffffffde74, hw_breakpoint_error=0x7fffffffde78, hw_bp_error_explained_already=0x7fffffffde7c) at ../../gdb/breakpoint.c:2498 #5 0x000000000051edf6 in insert_breakpoint_locations () at ../../gdb/breakpoint.c:2873 #6 0x000000000057f155 in proceed (addr=, siggnal=GDB_SIGNAL_0, step=0) at ../../gdb/infrun.c:2243 #7 0x0000000000572d54 in run_command_1 (args=0x0, from_tty=1, tbreak_at_main=) at ../../gdb/infcmd.c:617 #8 0x000000000064a60a in execute_command (p=0xb67161 "", from_tty=1) at ../../gdb/top.c:484 #9 0x00000000005933b5 in command_handler (command=0xb67160 "") at ../../gdb/event-top.c:431 #10 0x0000000000593dcb in command_line_handler (rl=) at ../../gdb/event-top.c:629 #11 0x00000000006907b9 in rl_callback_read_char () at ../../readline/callback.c:220 #12 0x0000000000593429 in rl_callback_read_char_wrapper (client_data=) at ../../gdb/event-top.c:163 #13 0x00000000005925e4 in process_event () at ../../gdb/event-loop.c:342 #14 process_event () at ../../gdb/event-loop.c:314 #15 0x00000000005929b8 in gdb_do_one_event () at ../../gdb/event-loop.c:406 #16 0x0000000000592b55 in start_event_loop () at ../../gdb/event-loop.c:431 #17 0x000000000058c033 in captured_command_loop (data=) at ../../gdb/main.c:258 #18 0x000000000058abeb in catch_errors (func=0x58c020 , func_args=0x0, errstring=0x74c8cd "", mask=6) at ../../gdb/exceptions.c:546 #19 0x000000000058c9c6 in captured_main (data=) at ../../gdb/main.c:1041 #20 0x000000000058abeb in catch_errors (func=0x58c330 , func_args=0x7fffffffe350, errstring=0x74c8cd "", mask=6) at ../../gdb/exceptions.c:546 #21 0x000000000058d354 in gdb_main (args=) at ../../gdb/main.c:1050 #22 0x00000000004595de in main (argc=, argv=) at ../../gdb/gdb.c:34 -- 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.