This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Questions on cross-gdb


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<ACE_Based_Pointer_Repository,
ACE_RW_Thread_Mutex>::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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]