This is the mail archive of the insight@sourceware.org mailing list for the Insight 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: MinGW setjmp SEGV


Andrew STUBBS wrote:

Hi,

I have been trying to build Insight 6.1 (patched into GDB 6.3) for MinGW (and Linux and Solaris but they weren't much trouble).

The problem I hit has been previously reported here: http://sources.redhat.com/ml/insight/2004-q1/msg00021.html.

There are a number of patches required to make it build, but most are trivial and may not be relevant since 6.1 so I shall not post them. Basically I had to check whether the cygwin filename-handling tcl functions exist before using them, define __INSIDE_CYGWIN__ in a couple of tcl/tk files, and rename the hooks because they now have a 'deprecated' prefix.

However, the most serious failure was caused by broken code in the tcl dll screwing up the SEH and causing setjmp to fail. This problem has been fixed in the latest tcl at tcl.sourceforge.net.

The attached patch (code copied from sourceforge) is sufficient to fix the issue. Note that I have included the diff of the whole file and it includes one of the minor changes mentioned above.

Hopefully this patch will help others who have hit the same problem.

Andrew Stubbs

You're an absolute star :)


Thanks for posting the patch. I got inspired to have another go at building an arm-elf Insight under mingw/msys. I've now managed to build Inisght 6.1 with gdb 6.3 up to a point. I have a functioning gdb but I'm having problems with some deprecated functions in gdbtk-cmds.c and gdb-register.c. Do you know what I need to use instead of these functions?

bfd_get_section_size_before_reloc'
DEPRECATED_REGISTER_CONVERTIBLE'
DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
DEPRECATED_REGISTER_VIRTUAL_SIZE

gcc -g -O2 \
-o insight.exe gdbtk-main.o libgdb.a \
../sim/arm/libsim.a ../bfd/libbfd.a ../readline/libreadline.a ../opcodes/libopcodes.a ../libiberty/libiberty.a ../libgui/src/l
ibgui.a -L/c/projects/devkitPro/sources/arm-elf/insight/itcl/itcl -litcl32 -L/c/projects/devkitPro/sources/arm-elf/insight/itcl/itk -litk32
-L/c/projects/devkitPro/sources/arm-elf/insight/tk/win -ltk84 -L/c/projects/devkitPro/sources/arm-elf/insight/tcl/win -ltcl84 -lgdi32 -lc
omdlg32 -limm32 -lcomctl32 -lshell32 -lm ../libiberty/libiberty.a -luser32 -lwsock32 -lpsapi
libgdb.a(gdbtk-cmds.o)(.text+0x2ee1): In function `gdb_load_info':
c:/projects/devkitPro/sources/arm-elf/insight/gdb/../../../insight/src-new/gdb/gdbtk/generic/gdbtk-cmds.c:901: undefined reference to `bfd_g
et_section_size_before_reloc'
libgdb.a(gdbtk-register.o)(.text+0x368): In function `get_register':
c:/projects/devkitPro/sources/arm-elf/insight/gdb/../../../insight/src-new/gdb/gdbtk/generic/gdbtk-register.c:305: undefined reference to `D
EPRECATED_REGISTER_CONVERTIBLE'
libgdb.a(gdbtk-register.o)(.text+0x38d):c:/projects/devkitPro/sources/arm-elf/insight/gdb/../../../insight/src-new/gdb/gdbtk/generic/gdbtk-r
egister.c:307: undefined reference to `DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL'
libgdb.a(gdbtk-register.o)(.text+0x4b9):c:/projects/devkitPro/sources/arm-elf/insight/gdb/../../../insight/src-new/gdb/gdbtk/generic/gdbtk-r
egister.c:311: undefined reference to `DEPRECATED_REGISTER_VIRTUAL_SIZE'
collect2: ld returned 1 exit status
make: *** [insight.exe] Error 1


cross posted to gdb list in case anyone there can point me in the right direction.

Dave


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