From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68379 invoked by alias); 6 Mar 2020 17:12:37 -0000 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 Received: (qmail 68371 invoked by uid 89); 6 Mar 2020 17:12:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=UD:target.c, targetc, target.c, repos X-HELO: sonic302-21.consmr.mail.ir2.yahoo.com Received: from sonic302-21.consmr.mail.ir2.yahoo.com (HELO sonic302-21.consmr.mail.ir2.yahoo.com) (87.248.110.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Mar 2020 17:12:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1583514753; bh=VRXHQklNLyalhCFgUk3qCXelSbWiYcez+OQ7DwhaQEc=; h=Date:From:To:In-Reply-To:References:Subject:From:Subject; b=gk3I9hPJ056sjUBUktU8m3SB4d3Xa+8rj3LHgIJnFrUFCcqsggxXqDmBDnKXHbW7rG1e2bNhlz7c+FD98RXUp7mmbqeulQ55VfyHZlSaZUGGbyMV/+ogVoOG6I2KlyMWGz5mfhCQgq2+D/AYXzYUUDl2XLSgNNrfSjggb5RLKgvvb6bA9NcV7nqQus9YdkbAQAKIRMdb7RjUgK/1++U/m5bPl8CPyxOKVyiMllvBSmal8inFSbHvVsu+mImKMhO4ghtNjKNX2qfOPY/rDvPSk+HRTt1jRcqSGYjJou9g8AXZ/5G5wbLW9v93Xw9MrpYVPxvfV9sqqmeE4RlzcknQEg== Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ir2.yahoo.com with HTTP; Fri, 6 Mar 2020 17:12:33 +0000 Date: Fri, 06 Mar 2020 17:12:00 -0000 From: "Hannes Domani via gdb-patches" Reply-To: Hannes Domani To: Gdb-patches Message-ID: <1385253918.8681967.1583514751581@mail.yahoo.com> In-Reply-To: References: <20200306165000.3073-1-ssbssa.ref@yahoo.de> <20200306165000.3073-1-ssbssa@yahoo.de> <01f93db0-846f-8a9b-0642-498be38e75ff@simark.ca> Subject: Re: [PATCH] Don't try to get the TIB address without an inferior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2020-03/txt/msg00149.txt Am Freitag, 6. M=C3=A4rz 2020, 18:05:50 MEZ hat Simon Marchi Folgendes geschrieben: > On 2020-03-06 11:57 a.m., Simon Marchi wrote: > > On 2020-03-06 11:50 a.m., Hannes Domani via gdb-patches wrote: > >> The target_get_tib_address call always fails in this case, and there i= s an > >> error when changing the program with the file command: > >> > >> (gdb) file allocer64.exe > >> Reading symbols from allocer64.exe... > >> You can't do that when your target is `exec' > > Actually, can you precise the steps for reproducing this issue?=C2=A0 Jus= t calling > "file" doesn't cause windows_solib_create_inferior_hook to be called in my > build*, so there must be something more to it. > > * My build is an --enable-targets=3Dall on a Linux host, in which I load = a binary > compiled with x86_64-w64-mingw32-gcc. Just starting, then the file command is enough for me: >\gdb\build64\gdb-git\gdb\gdb.exe -q (gdb) file allocer64.exe Reading symbols from allocer64.exe... You can't do that when your target is `exec' Backtrace of my try with target_has_memory: (gdb) bt #0=C2=A0 exec_target::has_memory (this=3D0x993630 ) at C:/src/rep= os/binutils-gdb.git/gdb/exec.c:1158 #1=C2=A0 0x000000000065a8c5 in target_has_memory_1 () at C:/src/repos/binut= ils-gdb.git/gdb/target.c:197 #2=C2=A0 0x00000000006c9c5c in windows_solib_create_inferior_hook (from_tty= =3D) at C:/src/repos/binutils-gdb.git/gdb/windows-tdep.c:846 #3=C2=A0 0x0000000000640ee6 in symbol_file_command (args=3Dargs@entry=3D0x2= fb565 "allocer64.exe", from_tty=3Dfrom_tty@entry=3D1) =C2=A0=C2=A0=C2=A0 at C:/src/repos/binutils-gdb.git/gdb/symfile.c:1663 #4=C2=A0 0x000000000051809e in file_command (arg=3D0x2fb565 "allocer64.exe"= , from_tty=3D1) at C:/src/repos/binutils-gdb.git/gdb/exec.c:536 #5=C2=A0 0x0000000000481022 in cmd_func (cmd=3D0x993630 , args=3D= 0x1 , from_tty=3D2) =C2=A0=C2=A0=C2=A0 at C:/src/repos/binutils-gdb.git/gdb/cli/cli-decode.c:19= 52 #6=C2=A0 0x0000000000673388 in execute_command (p=3D, p@entr= y=3D0x2fb560 "", from_tty=3D1) at C:/src/repos/binutils-gdb.git/gdb/top.c:6= 55 #7=C2=A0 0x0000000000515f34 in command_handler (command=3D0x2fb560 "") at C= :/src/repos/binutils-gdb.git/gdb/event-top.c:587 #8=C2=A0 0x0000000000516de2 in command_line_handler (rl=3D...) at C:/src/re= pos/binutils-gdb.git/gdb/event-top.c:772 #9=C2=A0 0x0000000000516713 in gdb_rl_callback_handler (rl=3D0x11f3d9f0 "fi= le allocer64.exe") =C2=A0=C2=A0=C2=A0 at c:/msys64/mingw64/x86_64-w64-mingw32/include/c++/9.2.= 0/bits/unique_ptr.h:153 #10 0x00000000006e449c in rl_callback_read_char () at C:/src/repos/binutils= -gdb.git/readline/readline/callback.c:281 #11 0x0000000000515a8e in gdb_rl_callback_read_char_wrapper_noexcept () at = C:/src/repos/binutils-gdb.git/gdb/event-top.c:176 #12 0x00000000005165c4 in gdb_rl_callback_read_char_wrapper (client_data=3D= ) at C:/src/repos/binutils-gdb.git/gdb/event-top.c:192 #13 0x00000000005158d2 in stdin_event_handler (error=3D, cli= ent_data=3D0x2f5f10) at C:/src/repos/binutils-gdb.git/gdb/event-top.c:515 #14 0x00000000005148f0 in handle_file_event (ready_mask=3D2, file_ptr=3D0x3= a9290) at C:/src/repos/binutils-gdb.git/gdb/event-loop.c:701 #15 gdb_wait_for_event (block=3D) at C:/src/repos/binutils-g= db.git/gdb/event-loop.c:852 #16 gdb_wait_for_event (block=3D) at C:/src/repos/binutils-g= db.git/gdb/event-loop.c:714 #17 0x0000000000514ace in gdb_do_one_event () at C:/src/repos/binutils-gdb.= git/gdb/event-loop.c:313 #18 0x0000000000514bbe in gdb_do_one_event () at C:/src/repos/binutils-gdb.= git/gdb/event-loop.c:337 #19 start_event_loop () at C:/src/repos/binutils-gdb.git/gdb/event-loop.c:3= 37 #20 0x0000000000593b32 in captured_command_loop () at C:/src/repos/binutils= -gdb.git/gdb/main.c:360 #21 0x0000000000595955 in captured_main (data=3D0x101bfdc0) at C:/src/repos= /binutils-gdb.git/gdb/main.c:1198 #22 gdb_main (args=3Dargs@entry=3D0x101bfe20) at C:/src/repos/binutils-gdb.= git/gdb/main.c:1213 #23 0x0000000000987617 in main (argc=3D3, argv=3D0xd4850) at C:/src/repos/b= inutils-gdb.git/gdb/gdb.c:32