From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10250 invoked by alias); 11 Aug 2009 18:31:14 -0000 Received: (qmail 10233 invoked by uid 22791); 11 Aug 2009 18:31:13 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_55,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Received: from hel.is.scarlet.be (HELO hel.is.scarlet.be) (193.74.71.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Aug 2009 18:31:04 +0000 Received: from [172.17.1.10] (ip-81-11-239-71.dsl.scarlet.be [81.11.239.71]) by hel.is.scarlet.be (8.14.2/8.14.2) with ESMTP id n7BIUxfw002112; Tue, 11 Aug 2009 20:31:00 +0200 Subject: Questions on cross-gdb From: Danny Backx Reply-To: danny.backx@scarlet.be To: gdb-patches@sourceware.org Content-Type: text/plain Date: Tue, 11 Aug 2009 19:22:00 -0000 Message-Id: <1250015539.5537.1120.camel@pavilion> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-DCC-scarlet.be-Metrics: hel 20001; Body=2 Fuz1=2 Fuz2=2 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-08/txt/msg00161.txt.bz2 Hi, I have a cross-gdb working relatively well between my linux PC and a i386-mingw32ce (Windows CE Embedded with a x86 clone processor) target. One of my patches for gdbserver is still outstanding, but that's another story. Today's questions relate to gdb. First, the output of "info share". After setting e.g. solib-search-path, we want it to behave as follows : (gdb) info share >From To Syms Read Shared Object Library No \Windows\iphlpapi.dll No \Windows\ws2.dll 0x41ee1000 0x41eec1fc Yes /opt/x86mingw32ce/bin/libgcc_s_sjlj-1.dll 0x42a11000 0x42ae2990 Yes /opt/x86mingw32ce/i386-mingw32ce/lib/libstdc++-6.dll 0x41f21000 0x420d9744 Yes libace.dll No \Windows\coredll.dll (gdb) meaning that the paths with backslashes get treated well. Previous situation (=bad) was : (gdb) info share >From To Syms Read Shared Object Library No \Windows\iphlpapi.dll No \Windows\ws2.dll No \network\x86\ace\libgcc_s_sjlj-1.dll No \network\x86\ace\libstdc++-6.dll 0x41f21000 0x420d9744 Yes libace.dll No \Windows\coredll.dll (gdb) There's support in the code for that (HAVE_DOS_BASED_FILE_SYSTEM), but it doesn't get enabled in my cross-environment. gdb gets compiled by the host gcc, which doesn't set stuff like _WIN32. So the HAVE_DOS_BASED_FILE_SYSTEM never gets defined. This happens both in gdb/* and in libiberty/* . Question 1 : where should I hack this ? I would like it to come from somewhere in the configuration scripts (and I'm now asking where would be the best place). Another thing to edit is then include/filenames.h which needs to grab this and do the right thing, instead of just reacting to _WIN32 and such. But that's a trivial fix. Question 2 : I occasionally have a problem - see below - setting breakpoints. A pointer to what might be causing this would be appreciated so I can chase the bug. (gdb) break 65 warning: (Internal error: pc 0xd4720040 in read in psymtab, but not in symtab.) warning: (Internal error: pc 0xd4720040 in read in psymtab, but not in symtab.) warning: (Internal error: pc 0xd4720040 in read in psymtab, but not in symtab.) warning: (Internal error: pc 0xd4720040 in read in psymtab, but not in symtab.) warning: (Internal error: pc 0xd4720040 in read in psymtab, but not in symtab.) warning: (Internal error: pc 0xd4720040 in read in psymtab, but not in symtab.) Note: breakpoint 2 also set at pc 0xd4720040. warning: (Internal error: pc 0xd4720040 in read in psymtab, but not in symtab.) Note: breakpoint 2 also set at pc 0xd4720040. warning: (Internal error: pc 0xd4720040 in read in psymtab, but not in symtab.) Breakpoint 2 at 0x408078: file /home/danny/src/ace/svn.dre.vanderbilt.edu/ACE_wrappers/ace/Singleton.cpp, line 65. (7 locations) (gdb) c Continuing. Warning: Cannot insert breakpoint 2. Error accessing memory address 0xd4720040: Input/output error. (gdb) q The program is running. Quit anyway (and kill it)? (y or n) n Not confirmed. (gdb) c Continuing. Warning: Cannot insert breakpoint 2. Error accessing memory address 0xd4720040: Input/output error. (gdb) del 2 (gdb) where #0 ACE_Singleton::instance () at /home/danny/src/ace/svn.dre.vanderbilt.edu/ACE_wrappers/ace/Singleton.cpp:62 #1 0x42e8109b in get_based_pointer_repository_instance () at Based_Pointer_Test_Lib.cpp:36 #2 0x004013c5 in singleton_test () at Based_Pointer_Test.cpp:132 #3 0x0040272e in run_main () at Based_Pointer_Test.cpp:425 #4 0x00401153 in ace_tmain_i (argc=1, argv=0x16023230) at Main.cpp:30 #5 0x004086cc in ACE_Main::run_i (this=0x1601fb50, argc=1, argv=0x16023230) at Main.cpp:27 #6 0x41f93efd in ACE_Main_Base::run (this=0x1601fb50, lpCmdLine=0x1601fc70 L"") at OS_main.cpp:146 #7 0x004010c5 in WinMain (hInstance=0x4410022, hPrevInstance=0x0, lpCmdLine=0x1601fc70 L"", nCmdShow=5) at Main.cpp:27 #8 0x0040103b in WinMainCRTStartup (hInst=0x4410022, hPrevInst=0x0, lpCmdLine=0x1601fc70 L"", nCmdShow=5) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/mingw/crt3.c:62 (gdb) c Continuing. Program exited with code 01. (gdb) -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info