From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 5692C385800D for ; Sat, 26 Dec 2020 00:00:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5692C385800D Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 0BQ00gex011468 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Dec 2020 19:00:47 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 0BQ00gex011468 Received: from [10.0.0.213] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 2E7D21E965; Fri, 25 Dec 2020 19:00:42 -0500 (EST) Subject: Re: gdb refuses to connect to localhost To: Reinaldo Molina Cc: gdb References: <20201225223622.a7xovhjzndth5a2x@molinamail.com> <20201225234536.fm6nyuulhw54lhwi@molinamail.com> From: Simon Marchi Message-ID: <9349ff8c-50b3-0a4c-88d4-e295d9b82ba2@polymtl.ca> Date: Fri, 25 Dec 2020 19:00:41 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20201225234536.fm6nyuulhw54lhwi@molinamail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Sat, 26 Dec 2020 00:00:42 +0000 X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Dec 2020 00:00:50 -0000 On 2020-12-25 6:45 p.m., Reinaldo Molina wrote: > Thanks for the quick reply. > > Trying your suggestion: > > Terminal 1: > > gdbserver 127.0.01:8889 build/luajit --remote-debug > > Terminal 2: > > > gdb build/luajit > GNU gdb (GDB) 10.1 > Copyright (C) 2020 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > Type "show copying" and "show warranty" for details. > This GDB was configured as "x86_64-pc-linux-gnu". > Type "show configuration" for configuration details. > For bug reporting instructions, please see: > . > Find the GDB manual and other documentation resources online at: > . > > For help, type "help". > Type "apropos word" to search for commands related to "word"... > Reading symbols from build/luajit... > (gdb) set debug remote 1 > (gdb) target remote localhost:8889 > Remote debugging using localhost:8889 > Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+;xmlRegisters=i386#6a...Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+;xmlRegisters=i386#6a...Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+;xmlRegisters=i386#6a...Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+;xmlRegisters=i386#6a...Timed out. > Timed out. > Timed out. > Ignoring packet error, continuing... > Packet qSupported (supported-packets) is supported > warning: unrecognized item "timeout" in "qSupported" response > Sending packet: $vMustReplyEmpty#3a...Sending packet: $vMustReplyEmpty#3a...Sending packet: $vMustReplyEmpty#3a...Sending packet: $vMustReplyEmpty#3a...Timed out. > Timed out. > Timed out. > Ignoring packet error, continuing... > Remote replied unexpectedly to 'vMustReplyEmpty': timeout > (gdb) target remote 0.0.0.0:8889 > Remote debugging using 0.0.0.0:8889 > Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+;xmlRegisters=i386#6a...Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+;xmlRegisters=i386#6a...Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+;xmlRegisters=i386#6a...Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+;xmlRegisters=i386#6a...Timed out. > Timed out. > Timed out. > Ignoring packet error, continuing... > Packet qSupported (supported-packets) is supported > warning: unrecognized item "timeout" in "qSupported" response > Sending packet: $vMustReplyEmpty#3a...Sending packet: $vMustReplyEmpty#3a...Sending packet: $vMustReplyEmpty#3a...Sending packet: $vMustReplyEmpty#3a...Timed out. > Timed out. > Timed out. > Ignoring packet error, continuing... > Remote replied unexpectedly to 'vMustReplyEmpty': timeout > (gdb) target remote 127.0.0.1:8889 > 127.0.0.1:8889: Connection timed out. Ok, I don't really know. I'd probably try to strace gdbserver to see if it at least accepts the incoming connection, and if so what happens after that. Simon