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]

Re: Building GDB 7.3.92 with MinGW


On 2012-1-13 23:48, Eli Zaretskii wrote:
Date: Fri, 13 Jan 2012 22:13:52 +0800
From: asmwarrior<asmwarrior@gmail.com>
CC: Joel Brobecker<brobecker@adacore.com>,dje@google.com,
  gdb-patches@sourceware.org

a, suppose you have gdb install or copied in some folder:
c:/path_to_mingw/bin/gdb.exe
c:/path_to_mingw/share/gdb/python/gdb (this folder contains some python script like:printing.py....)

b, run the gdb.exe.
b1, you can type:
python print gdb.PYTHONDIR
It should return the windows path: c:/path_to_mingw/share/gdb/python
Works for me.
I test it again today, and it does not works on my XP.
The official MinGW-gdb is build with such configure option(like my personal build):
          CFLAGS="-O2 -fno-omit-frame-pointer -mtune=i686" \
          ../gdb-7.3.1/configure \
          --program-suffix="-python27" \
          --prefix=/mingw \
          --host=mingw32 \
          --build=mingw32 \
          --target=mingw32 \
          --with-python=/python/python \
          --with-expat

When you put the MinGW in some different folders in the driver E:
like e:/mymingw1  and e:/mymingw2

When you run gdb and enter: python print gdb.PYTHONDIR, it will always return:
e:\mingw\share\gdb/python
You see, I have no such path here in dirver e.
I'm not sure how you test your gdb, did you just put you MinGW under e:/MinGW? Can you try some other places?


b2, you can continue type:
info pretty-printer
Then, gdb will report all the pretty-printers installed. If you encountered some error message like:
Undefined info command: "pretty-printer".  Try "help info".
This means gdb's own python script does not loaded correctly when gdb startup, this is because gdb can't find the path:
c:/path_to_mingw/share/gdb/python/gdb
What does it mean if "info pretty-printer" doesn't display anything,
but doesn't show any error messages, either?
If you don't have any pretty-printers installed, but gdb's own python script loaded correctly.
you will have nothing returned from gdb, like:
(gdb) info pretty-printer [ENTER HERE]
(gdb)

asmwarrior
ollydbg from codeblocks' forum



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