This is the mail archive of the gdb@sources.redhat.com 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]

[RFC] Fix for GDB failure to debug some win32 exes ?



This patch does solve the problem exposed in
http://sources.redhat.com/ml/gdb/2001-11/msg00074.html
See also
the cygwin list mail from Ignasi Villagrasa
entitled "Using gdb"
dated Thu, 08 Nov 2001 11:53:37 (not yet in archives).

This is not really more than a hack, but it does allow me to
debug my program.
Of course the crash that I see disappears when running the program
under GDB :(

Maybe this will solve Alan Hourihane's problem also ?
It depends if the same alternate tet section name was used.
Maybe its the default of Watcom compiler ?

What conditional should I add so that this only gets included if
the target is win32 API ?

$ cvs diff symfile.c
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.42
diff -r1.42 symfile.c
522,523c522,528
<     objfile->sect_index_text = sect->index;
<
---
 >     objfile->sect_index_text = sect->index;
 >   else
 >     {
 >      sect = bfd_get_section_by_name (objfile->obfd, "BEGTEXT");
 >      if (sect)
 >        objfile->sect_index_text = sect->index;
 >     }



Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99


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