Recent

Author Topic: Testers for GDB Based debugger / Windows / Lazarus SVN  (Read 17826 times)

Red_prig

  • Full Member
  • ***
  • Posts: 143
Re: Testers for GDB Based debugger / Windows / Lazarus SVN
« Reply #15 on: April 24, 2021, 11:55:49 pm »
As far as I could, I adapted Unicode for Windows. It was dreary.  :(

https://github.com/red-prig/binutils-gdb/tree/gdb-9-not_cygwin

Red_prig

  • Full Member
  • ***
  • Posts: 143

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Testers for GDB Based debugger / Windows / Lazarus SVN
« Reply #17 on: April 30, 2021, 02:29:55 pm »
Thanks, I have it on my todo, but unfortunately currently running out of time...

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Testers for GDB Based debugger / Windows / Lazarus SVN
« Reply #18 on: May 27, 2021, 12:15:11 am »
Long time, got a tiny bit of time now.
I tried to build it myself.
What options to you use for configure?

I tried:
Code: [Select]
../gdb/configure --enable-static=yes  --disable-gprof --with-expat  --host=x86_64-w64-mingw32  LDFLAGS=-static
make  LDFLAGS=-static
Also with "--with-system-readline".

But I get lots of errors.

1) bfd/bfd.in
#include "../gdb/wtou.h"

Does not work.
The generated config.h has the wrong path.
This may have to do with the build environment forcing me to configure and make in a separate directory.
mkdir builddir
cd buildir
../gdbsrc/configure ......

I worked around by placing a copy of that file in the folder that configure wrote to config.h

2) libiberty (and probably gas)
It ends up libtool/linking and cant resolve ustat and one other from wtou (don't recall the name)

I couldn't get past that.

------
My build system is a freshly installed msys2 with mingw64.

Any ideas?



2)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Testers for GDB Based debugger / Windows / Lazarus SVN
« Reply #19 on: May 28, 2021, 01:33:44 am »
Ok, I managed to build / Needed to hack a few things to get around compilation errors...

First runs in my test suite are very positive. Lets see...

I have my changes here:
https://github.com/red-prig/binutils-gdb/compare/gdb-9-not_cygwin...User4martin:win-unicode-9-2
Those are trial and error workarounds to compiler error messages / so no candidates for a beauty pageant
« Last Edit: May 28, 2021, 01:56:08 am by Martin_fr »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Testers for GDB Based debugger / Windows / Lazarus SVN
« Reply #20 on: May 28, 2021, 04:00:11 am »
I uploaded a 64bit and a 32bit build to our Sourceforge "Alternative GDB" section (in each respective Windows folder).
* GDB 9.2 unicode for Win 64
* GDB 9.2 unicode for Win 32

Those versions have a modification to their version line. This allows the IDE (minimum version 2.1 r65142) to detect this build, and send the environment and cmd-line-args as utf8.





Please test.





A very big thanks to Red_prig.


Red_prig

  • Full Member
  • ***
  • Posts: 143
Re: Testers for GDB Based debugger / Windows / Lazarus SVN
« Reply #21 on: May 28, 2021, 08:17:52 am »
I left the build scripts in the "cross_x32" and "cross_x64" files (and for "expat" in "expat/cross_x32" "expat/cross_x64"), perhaps there were differences in the path to the folders with another build script.  8-)
However, I'm still not sure that I managed to fix all the calls. In particular, I could not full adapt the part of the keyboard input directly to the console window.  :-\

Red_prig

  • Full Member
  • ***
  • Posts: 143
Re: Testers for GDB Based debugger / Windows / Lazarus SVN
« Reply #22 on: May 28, 2021, 08:26:35 am »
Also note that I added the postfix "-not_cygwin"

Quote
This GDB was configured as "x86_64-w64-mingw32-not_cygwin".

 so that lazarus correctly understand the encoding, if not necessary, it can be removed and detected only by the line "GNU gdb unicode".

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Testers for GDB Based debugger / Windows / Lazarus SVN
« Reply #23 on: May 28, 2021, 01:29:04 pm »
Also note that I added the postfix "-not_cygwin"

Quote
This GDB was configured as "x86_64-w64-mingw32-not_cygwin".

 so that lazarus correctly understand the encoding, if not necessary, it can be removed and detected only by the line "GNU gdb unicode".
Ah, I did not spot that. But yes that may better be removed.

Lazarus looks for cygwin in the configured part. It probably does no harm, but it can cause extra work.
Cygwin mangles returned path names, and Lazarus activates code to demangle them.
Lazarus just tests if it sees cygwin, it does not check for the "not" part.

We could use the "unicode" there, but really its not a config issue.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Testers for GDB Based debugger / Windows / Lazarus SVN
« Reply #24 on: May 28, 2021, 02:19:19 pm »
I found your config line
Code: [Select]
./../configure --enable-static=yes --disable-gprof --disable-binutils --disable-gas --disable-gold --disable-texinfo --disable-gdbserver --target=i686-w64-mingw32 --host=i686-w64-mingw32
+
That is why you got no errors. I only disable gprof

 

TinyPortal © 2005-2018