From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28310 invoked by alias); 27 Dec 2013 02:30:16 -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 28283 invoked by uid 48); 27 Dec 2013 02:30:16 -0000 From: "asmwarrior at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug mi/15806] file path separator becomes "\\\\" instead of "\\" when GDB report breakpoint-modified in MI mode Date: Fri, 27 Dec 2013 02:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: mi X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: asmwarrior at gmail 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-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q4/txt/msg00600.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=15806 --- Comment #4 from asmwarrior --- I did some test by disable the double slash generation in the function call of gdb_flush (mi->event_channel); Now, the output has changed from: =breakpoint-created,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",a ddr="0x0040162c",func="main()",file="E:\\\\code\\\\cb\\\\test_code\\\\debug_gdb2 011-12-01\\\\main.cpp",fullname="E:\\\\code\\\\cb\\\\test_code\\\\debug_gdb2011- 12-01\\\\main.cpp",line="26",thread-groups=["i1"],times="0",original-location="m ain()"} to =breakpoint-created,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",a ddr="0x0040162c",func="main()",file="E:\\code\\cb\\test_code\\debug_gdb2011-12-0 1\\main.cpp",fullname="E:\\code\\cb\\test_code\\debug_gdb2011-12-01\\main.cpp",l ine="26",thread-groups=["i1"],times="0",original-location="main()"} Looks good, but the side effect is that the other message has changed from: =library-loaded,id="D:\\mingw-builds\\473\\mingw32\\bin\\libwinpthread-1.dll",ta rget-name="D:\\mingw-builds\\473\\mingw32\\bin\\libwinpthread-1.dll",host-name=" D:\\mingw-builds\\473\\mingw32\\bin\\libwinpthread-1.dll",symbols-loaded="0",thr ead-group="i1" to =library-loaded,id="D:\mingw-builds\473\mingw32\bin\libwinpthread-1.dll",target- name="D:\mingw-builds\473\mingw32\bin\libwinpthread-1.dll",host-name="D:\mingw-b uilds\473\mingw32\bin\libwinpthread-1.dll",symbols-loaded="0",thread-group="i1" This is bad, because I think the former case in the library-loaded message is correct. By looking at the source code: static void mi_solib_loaded (struct so_list *solib) { struct mi_interp *mi = top_level_interpreter_data (); target_terminal_ours (); if (gdbarch_has_global_solist (target_gdbarch ())) fprintf_unfiltered (mi->event_channel, "library-loaded,id=\"%s\",target-name=\"%s\"," "host-name=\"%s\",symbols-loaded=\"%d\"", solib->so_original_name, solib->so_original_name, solib->so_name, solib->symbols_loaded); else fprintf_unfiltered (mi->event_channel, "library-loaded,id=\"%s\",target-name=\"%s\"," "host-name=\"%s\",symbols-loaded=\"%d\"," "thread-group=\"i%d\"", solib->so_original_name, solib->so_original_name, solib->so_name, solib->symbols_loaded, current_inferior ()->num); gdb_flush (mi->event_channel); } I see that fprintf_unfltered just output something like "D:\mingw-builds\473..." string to the the mi_event_channel, so if double backslash is disabled in gdb_flush(), we get the result containing "D:\mingw-builds\473...". So, I don't have an idea to fix this bug. -- You are receiving this mail because: You are on the CC list for the bug.