I downloaded a GDB package from http://ftp.gnu.org/gnu/gdb/ and built a GDB server from it to run on Linux Powerpc. But I don't know how to build a GDB that runs on Windows and that can communicate with a GDB server running on Linux Powerpc, or where to download one.
Asked
Active
Viewed 1,334 times
2 Answers
1
I don't know how to build a GDB that runs on Windows and that can communicate with a GDB server running on Linux Powerpc
You need to build a cross-debugger. Usually it's something like:
mkdir build && cd build &&
../configure --target=powerpc-linux &&
make

Employed Russian
- 199,314
- 34
- 295
- 362
-
Thanks. But I think that will just produce a GDB that runs on the same system on which it was built, i.e. x86 Linux. Am I missing anything? – xiaokaoy Mar 17 '17 at 03:27
-
1@xiaokaoy You need to build it on a system on which you are intending to run it, i.e. Windows. – Employed Russian Mar 17 '17 at 03:30
-
In that case, do I need to install anything like a cross-compiler on Windows before doing the **configure** and **make**? – xiaokaoy Mar 17 '17 at 03:38
-
@xiaokaoy You cross-compile when your build machine is different from the machine where you actually run the program, which is *not* what you are trying to do. However, it's likely that you'll need to install *some* packages GDB depends on. I've never built GDB on Windows, so I don't know what these may be. `configure` will tell you though. – Employed Russian Mar 17 '17 at 03:47
-
Do you know what is the target name for a 32 bit x86-linux? my host is windows 64 – Dumbo May 25 '23 at 15:52
0
I managed to build a GDB that runs on Windows to debug applications on Powerpc/Linux. I used MinGW and the same GDB package I had used for building GDB server. In a shell offered by Mingw, I also typed commands like configure
and make
.

xiaokaoy
- 1,608
- 3
- 15
- 27
-
Hi how did you manage to run the GDB instance in windows. I also cross compiled gdb successfully in linux but need dependencies (some DLL files) from GCC. Did you cross compile GCC also? – Mike F Jun 11 '23 at 10:05
-
1@MikeF Sorry, I can't remember clearly. But I'm pretty sure I didn't cross compile GCC. I installed GCC instead in MinGW instead, I think. – xiaokaoy Jun 19 '23 at 10:04