From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sonic303-20.consmr.mail.ir2.yahoo.com (sonic303-20.consmr.mail.ir2.yahoo.com [77.238.178.201]) by sourceware.org (Postfix) with ESMTPS id B83233858C74 for ; Fri, 2 Sep 2022 12:34:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B83233858C74 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=yahoo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yahoo.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1662122072; bh=dL6Qvj4KZfEglCHbjPhgWnc8mDVW6pnqDjVPrXqdrm0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=fFWwrJ6nsuem3HdH1f2f6+T55pdbQAT3HtmEm3CZP80/iedAO+T3lUIebiOnAsoRBcj6zKCXYuH0W/h55l9dbsw9rpQCQw39Hs+c49miSAKkYQAz4ajRrKFg+gIYV8nBRpYOxpYphWTHscGNZT9JsRF/2Pg2pQRYmYTFs6ex+S0ebkiSZmJ1OCnK3CnCSsoa7k9i67HNXyTI3SOPaGhsOriSBs1X96ppTJf4qUTzBfJ/e0u07EHOM8kQ2ogJdTu4HPhOT7w18NpWKc645mrn2VBpz+pv2uXBLm40BJ0MR2P5OzCENFhgeQnWhtdwqUn9UToJf7Lag0yvyi8+Z4uDLw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1662122072; bh=orTIyIn+K98nn8HTRGzRRBTtYC1mIVZSUxtaDX/sDOU=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=NXl6K+pDE/QH9q/bhrktmi0NrjnJrYJzw7NC61l+fAygs0qg3XSYHMdhgbnSrFmpn716yrPrpZQ6iIKQxU6eGesw3qHpKM5MVMH69/+MdrAD9K3vDynNdgC87Z7AXUiwJRq2EAxPyi7nx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u5_I5u3tFw8N4IxS9fXogQSj1N6_9xJhPiR1ZGx9AN9qMvhb6vPr3GTcf OOVNae1rusODMJrbs15bOjXxjto4Rop._Y2kXpUEXWMlIv3m152pELxxq4oEKkwCLKLT7cztH2lj 2ckOMOAZ25zYWe4Y7YVuTILjmK.bM.CrkYzqS1FV0.J4aMPhfrVYzt5rtdaLXMA6Bd_dyDWihb9P DKtc3wko2I0NMf2fadKWVDKVsKqclWDkZTizEehqComY2CZj4NlMpG_VfBhBNSQ3C2VVWBALmHog ojAl32UngT1i1pKvCEN3WoabfhBvJrF811RPpn9ikoBQbNnqWEkd8hCalUbZ7h8yE9gRRs4PMhcr dI1O24KHYAdxNE.EmwKxdEvRrlBnsuvCDVmq4IinRmnw.Sh_KP.FHs5kCN6o7AiBapafyJm1d8eh pTOQgkI.MDsJ42BBFVUSD X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ir2.yahoo.com with HTTP; Fri, 2 Sep 2022 12:34:32 +0000 Received: by hermes--canary-production-ir2-85867b7b87-l48vh (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ed06f4137809c36ae2679406e8dbd8d3; Fri, 02 Sep 2022 12:34:27 +0000 (UTC) Message-ID: Date: Fri, 2 Sep 2022 14:34:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: Refresh TUI source panel after "monitor reset" Content-Language: en-GB To: Pedro Alves , Andrew Burgess Cc: gdb@sourceware.org References: <48b5be62-64c1-c7bb-a560-e454ffe2f0ba.ref@yahoo.de> <48b5be62-64c1-c7bb-a560-e454ffe2f0ba@yahoo.de> <87h74ab1ia.fsf@redhat.com> <7699942f-4c45-4cf4-0f54-dc1948262c9f@yahoo.de> From: "R. Diez" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.20595 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > Pedro Alves wrote: > Did you try just "frame"? That's what I typically use to make the source pane refocus on the current frame, where > the program is stopped. > Andrew Burgess wrote: > Completely untested, but I wonder if 'list *$pc' does what you want? I have been investigating a little more. It's been some time, so I'll start from the beginning again. I have a bootloader and the main firmware. Normally, I program the main firmware with OpenOCD, so GDB knows where the firmware source code is located. The bootloader on the target does not normally change. It is a different project, its debug information is in a different .elf file, so its source code is not automatically available when I debug the main firmware. Say I pause execution by pressing Ctrl+C in GDB. The TUI interface shows then the source line that corresponds to the current PC. So far so good. Now I do a "monitor reset halt", followed by a "flushregs". However, the TUI interface still shows the old source code position. That is misleading. If I issue command "print $pc", I can see that the PC register was updated fine. Command "frame" does not help. It prints the right frame address (the same address as the PC), and that is all. Command "list *$pc" is ignored, because the PC points to the bootloader, and its source code is not available when debugging the main firmware. It is particularly annoying that no hint or error indication is printed. Command "disassemble $pc,+10" dumps the disassembly on the command pane, and does not really help. Say you now switch to "layout split" mode. Both the source panel and the disassembly panel still show the old source code position, which is wrong. If you now issue command "disassemble $pc,+10", then the disassembly panel jumps to the right position, and the source panel (if any) shows "[ No Source Available ]". That is now more helpful. However, TUI still remembers its internal "current source position", which is still the old (wrong) one. If you now resize the GDB window with the mouse, then both source and disassembly panels jump to the old, wrong position, which is very misleading. After all, resizing the window should not change the displayed addresses. TUI's internal "current source position" only gets updated after you execute one assembly instruction. I was hoping there was some way to tell GDB to update that "current display position" right after command "monitor reset halt" and/or "flushregs". Regards, rdiez