From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20568 invoked by alias); 26 Nov 2012 10:14:16 -0000 Received: (qmail 20558 invoked by uid 22791); 26 Nov 2012 10:14:15 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,MSGID_MULTIPLE_AT,TW_FC,TW_SM,TW_YM X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Nov 2012 10:14:08 +0000 Received: from md15.u-strasbg.fr (md15.u-strasbg.fr [130.79.200.204]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAQAE5Av084471 ; Mon, 26 Nov 2012 11:14:05 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms18.u-strasbg.fr [130.79.204.118]) by md15.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAQAE4cQ026104 ; Mon, 26 Nov 2012 11:14:05 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAQADx38022258 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Mon, 26 Nov 2012 11:13:59 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'asmwarrior'" Cc: References: <834nm07z0s.fsf@gnu.org> <5077FEB9.4030304@redhat.com> <83y5jb7rfe.fsf@gnu.org> <006001cdaada$00c81f00$02585d00$@muller@ics-cnrs.unistra.fr> <20121024194517.GK3555@adacore.com> <011901cdb2ab$48076b90$d81642b0$@muller@ics-cnrs.unistra.fr> <20121105171121.GA2972@adacore.com> <50991f5f.8382440a.1100.ffff82abSMTPIN_ADDED@mx.google.com> <509ABA17.30507@redhat.com> <000301cdbd96$f5cd9f10$e168dd30$@muller@ics-cnrs.unistra.fr> <20121122173019.GF9964@adacore.com> <15690.5992342674$1353883881@news.gmane.org> <50B2EAC7.6080502@gmail.com> In-Reply-To: <50B2EAC7.6080502@gmail.com> Subject: RE: [RFC-v4] Fix .text section offset for windows DLL (was Calling __stdcall functions in the inferior) Date: Mon, 26 Nov 2012 10:14:00 -0000 Message-ID: <003f01cdcbbe$c3812d20$4a838760$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00645.txt.bz2 Hi all, thanks for trying the patch out... As I commented inside my email, I=20 am not familiar with the make_cleanup/ do_cleanups functions. The crash you see it related to my lack of knowledge in that area, sorry about this. I really do need advice from knowledgeable persons about how to correctly chain several cleanups... Pierre=20 > -----Message d'origine----- > De : gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de asmwarrior > Envoy=C3=A9 : lundi 26 novembre 2012 05:07 > =C3=80 : Pierre Muller > Cc : gdb-patches@sourceware.org > Objet : Re: [RFC-v4] Fix .text section offset for windows DLL (was Calling > __stdcall functions in the inferior) >=20 > On 2012-11-26 6:50, Pierre Muller wrote: > > I attach a new version of my patch to > > cope with variable offset of .text section for Windows OS DLL's. > > > > I hope I have taken all advices of Joel in account. > > In fact, I was unable to satisfy one suggestion... > > See below, the answer about my lack of C knowledge. > > > > > > Hoping we are getting closer... > > > > Pierre Muller > > >=20 > gdb crash here, see the Backtrace: >=20 > (gdb) file cmd.exe > Reading symbols from E:\code\cb\test_code\gdbpython-demo\bin\cmd.exe...do= ne. > (gdb) r > Starting program: E:\code\cb\test_code\gdbpython-demo\bin\cmd.exe > [New Thread 63092.0xf220] > warning: HEAP[gdbcvs26.exe]: > warning: Invalid Address specified to RtlFreeHeap( 00290000, 04C58028 ) >=20 >=20 > Program received signal SIGTRAP, Trace/breakpoint trap. > 0x7c90120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.d= ll > (gdb) bt > #0 0x7c90120f in ntdll!DbgUiConnectToDbg () > from C:\WINDOWS\system32\ntdll.dll > #1 0x7c96ee31 in ntdll!RtlpNtMakeTemporaryKey () > from C:\WINDOWS\system32\ntdll.dll > #2 0x7c96f26e in ntdll!RtlpNtMakeTemporaryKey () > from C:\WINDOWS\system32\ntdll.dll > #3 0x7c970456 in ntdll!RtlpNtMakeTemporaryKey () > from C:\WINDOWS\system32\ntdll.dll > #4 0x7c94bafc in ntdll!LdrFindEntryForAddress () > from C:\WINDOWS\system32\ntdll.dll > #5 0x00290000 in ?? () > #6 0x7c91a1ba in ntdll!RtlpUnWaitCriticalSection () > from C:\WINDOWS\system32\ntdll.dll > #7 0x77c2c2de in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll > #8 0x00290000 in ?? () > #9 0x004a10dd in do_my_cleanups (pmy_chain=3D0x4c58020, old_chain=3D0x4c= 58020) > at ../../gdb/gdb/cleanups.c:155 > #10 0x00536102 in read_pe_exported_syms (objfile=3D0x4bf9008) > at ../../gdb/gdb/coff-pe-read.c:595 > #11 0x00535158 in coff_symtab_read (objfile=3D0x4bf9008, nsyms=3D0, > symtab_offset=3D) at ../../gdb/gdb/coffread.c:1127 > #12 coff_symfile_read (objfile=3D0x4bf9008, symfile_flags=3D8) > at ../../gdb/gdb/coffread.c:610 > #13 0x004d39e3 in syms_from_objfile (objfile=3D0x4bf9008, > addrs=3D, offsets=3D0x0, num_offsets=3D0, add_flags= =3D8) > at ../../gdb/gdb/symfile.c:999 > #14 0x004d3ce0 in symbol_file_add_with_addrs_or_offsets ( > abfd=3D, add_flags=3D8, addrs=3D0x4bef518, > flags=3D, parent=3D0x0, num_offsets=3D0, offsets=3D0x= 0) > at ../../gdb/gdb/symfile.c:1105 > #15 0x005c27a7 in solib_read_symbols (so=3D0x30055c8, flags=3D8) > at ../../gdb/gdb/solib.c:608 > #16 0x005c2bda in solib_add (pattern=3D0x0, from_tty=3D0, > target=3D0x96dfa0 , readsyms=3D1) at > ../../gdb/gdb/solib.c:919 > #17 0x004dfa5e in post_create_inferior (target=3D0x96dfa0 , > from_tty=3D0) at ../../gdb/gdb/infcmd.c:477 > #18 0x004dfc0c in run_command_1 (args=3D0x0, from_tty=3D, > tbreak_at_main=3D) at ../../gdb/gdb/infcmd.c:631 > #19 0x005ad435 in execute_command (p=3D0x294331 "", from_tty=3D1) > at ../../gdb/gdb/top.c:491 > #20 0x004fd7b6 in command_handler (command=3D0x294330 "") > at ../../gdb/gdb/event-top.c:429 > #21 0x004fdf63 in command_line_handler (rl=3D0x2f98a28 " ") > at ../../gdb/gdb/event-top.c:630 > #22 0x005debd1 in rl_callback_read_char () > at ../../gdb/readline/callback.c:220 > #23 0x004fd828 in rl_callback_read_char_wrapper (client_data=3D0x0) > at ../../gdb/gdb/event-top.c:163 > #24 0x004fcb24 in handle_file_event (data=3D...) > at ../../gdb/gdb/event-loop.c:827 > #25 0x004fcab3 in process_event () at ../../gdb/gdb/event-loop.c:401 > #26 process_event () at ../../gdb/gdb/event-loop.c:351 > #27 0x004fce35 in gdb_do_one_event () at ../../gdb/gdb/event-loop.c:465 > #28 0x004fcf8c in start_event_loop () at ../../gdb/gdb/event-loop.c:490 > #29 0x004f7762 in captured_command_loop (data=3D0x0) at > ../../gdb/gdb/main.c:256 > #30 0x004f64cb in catch_errors (func=3D0x4f7750 , > func_args=3D0x0, errstring=3D0x735b8d <__PRETTY_FUNCTION__.12478+107= > "", > mask=3D6) at ../../gdb/gdb/exceptions.c:546 > #31 0x004f8266 in captured_main (data=3D0x2a6fee0) at > ../../gdb/gdb/main.c:1032 > #32 0x004f64cb in catch_errors (func=3D0x4f7910 , > func_args=3D0x2a6fee0, > errstring=3D0x735b8d <__PRETTY_FUNCTION__.12478+107> "", mask=3D6) > at ../../gdb/gdb/exceptions.c:546 > #33 0x004f8850 in gdb_main (args=3D0x2a6fee0) at ../../gdb/gdb/main.c:1041 > #34 0x006d0218 in main (argc=3D1, argv=3D0x293ea0) at ../../gdb/gdb/gdb.c= :34 > (gdb)