public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: MinGW setjmp SEGV
       [not found] <op.su1e3pz3o669wz@terrorhawk.bri.st.com>
@ 2005-09-21  2:25 ` Dave Murphy
  2005-09-21  9:00   ` Andrew STUBBS
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Murphy @ 2005-09-21  2:25 UTC (permalink / raw)
  To: Andrew STUBBS; +Cc: insight, gdb list

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: MinGW setjmp SEGV
  2005-09-21  2:25 ` MinGW setjmp SEGV Dave Murphy
@ 2005-09-21  9:00   ` Andrew STUBBS
  2005-09-21 21:25     ` Dave Murphy
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew STUBBS @ 2005-09-21  9:00 UTC (permalink / raw)
  To: Dave Murphy; +Cc: insight, gdb list

Dave Murphy wrote:
> 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'

This can be replaced with bfd_get_section_size().

> DEPRECATED_REGISTER_CONVERTIBLE'
> DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
> DEPRECATED_REGISTER_VIRTUAL_SIZE

These can just be removed. See 
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/gdbtk/generic/gdbtk-register.c.diff?r1=1.24&r2=1.25&cvsroot=src&f=h

HTH
Andrew Stubbs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: MinGW setjmp SEGV
  2005-09-21  9:00   ` Andrew STUBBS
@ 2005-09-21 21:25     ` Dave Murphy
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Murphy @ 2005-09-21 21:25 UTC (permalink / raw)
  To: Andrew STUBBS; +Cc: insight, gdb list

Andrew STUBBS wrote:

> Dave Murphy wrote:
>
>> bfd_get_section_size_before_reloc'
>
>
> This can be replaced with bfd_get_section_size().
>
>> DEPRECATED_REGISTER_CONVERTIBLE'
>> DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
>> DEPRECATED_REGISTER_VIRTUAL_SIZE
>
>
> These can just be removed. See 
> http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/gdbtk/generic/gdbtk-register.c.diff?r1=1.24&r2=1.25&cvsroot=src&f=h 
>
>
Excellent, that was the final piece in the puzzle to get me up and 
running. Looking good on native i386. Tnanks again for finding the tcl 
problem :)


Dave

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-09-21 21:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <op.su1e3pz3o669wz@terrorhawk.bri.st.com>
2005-09-21  2:25 ` MinGW setjmp SEGV Dave Murphy
2005-09-21  9:00   ` Andrew STUBBS
2005-09-21 21:25     ` Dave Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).