From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 8FE5E385803F for ; Thu, 3 Mar 2022 12:24:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8FE5E385803F Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-106-ikxAKd3_MQCn1flv94BaSQ-1; Thu, 03 Mar 2022 07:23:59 -0500 X-MC-Unique: ikxAKd3_MQCn1flv94BaSQ-1 Received: by mail-wm1-f69.google.com with SMTP id r133-20020a1c448b000000b00385c3f3defaso857821wma.3 for ; Thu, 03 Mar 2022 04:23:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=o0/6FHH9/DYYnq8AgOzeunLOPn5JO5lqP1piW2N/xOQ=; b=kSp7eYm2IOKxRJ8IP9iMvAWM98phf3vSAmufs9hP3lOQV/cVFr/+ictszlwTKqyC50 J7UWsATIy0JSnsYnAkAfiihBELGT97sr8j2MClYqwqe5ZRxGx3CWoG6HYMY3zuHDanP8 vg9p8NE/4jOPinqwAJbGRGrDaP6FWIuJDuTdebQMsR+/GxzsEerNJQu/RaFcmrYHl+OE iwybLgQTH5UOOYUwwQb7K5ZCeEJSMHnkg4eFQUdCz2x5ipZG3jTp9SD9A14kyjBoOjXK OnxHcs6d9S0pDhdEY9UUoP5WNxwK/q44EBc1I46SX6Kzmupdn7ApIPZ1jvP0abYA777l P4Rw== X-Gm-Message-State: AOAM5312ciQzjLFigknhZWFqMeKUoNSRNIvRA2e6ymoW0/2JksVV5Ehh yCqp9e+us4iqNeT8jHgFMMRHrUjgNzWvjJSJ/i1+/ZlBM3FIQDqV1xRQy9RBKUvnWsXy84AjSWr C8/cSSZcBDGgrtAWdQ2IJjQ== X-Received: by 2002:a5d:588a:0:b0:1e8:b478:e74f with SMTP id n10-20020a5d588a000000b001e8b478e74fmr26808253wrf.210.1646310237707; Thu, 03 Mar 2022 04:23:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxM1tE3IOZx6S3zrhMODIxNnaEvBZYhM7YjYCoysalJ0PLNM3IjFQozg39FsCmd1F0TqnsMeA== X-Received: by 2002:a5d:588a:0:b0:1e8:b478:e74f with SMTP id n10-20020a5d588a000000b001e8b478e74fmr26808225wrf.210.1646310237236; Thu, 03 Mar 2022 04:23:57 -0800 (PST) Received: from localhost (host86-169-131-29.range86-169.btcentralplus.com. [86.169.131.29]) by smtp.gmail.com with ESMTPSA id x2-20020a7bc762000000b00380fd1ba4ebsm14893578wmk.9.2022.03.03.04.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 04:23:56 -0800 (PST) From: Andrew Burgess To: William Tambe Cc: gdb-patches@sourceware.org Subject: Re: Help figuring out why `info registers` is showing with gdbserver target In-Reply-To: References: <87y21sxpra.fsf@redhat.com> Date: Thu, 03 Mar 2022 12:23:55 +0000 Message-ID: <87fsnzxm04.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_LOTSOFHASH, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2022 12:24:06 -0000 William Tambe via Gdb-patches writes: > On Wed, Mar 2, 2022 at 10:50 AM Andrew Burgess wrote: >> >> William Tambe via Gdb-patches writes: >> >> > Regarding this issue, support for gdbserver has been implemented here: >> > https://github.com/fontamsoc/binutils-gdb/blob/b2eeeae0/gdbserver/linux-pu32-low.cc >> > >> > Support for gdb has been implemented here: >> > https://github.com/fontamsoc/binutils-gdb/blob/b2eeeae0/gdb/pu32-tdep.c >> > >> > gdb is able to successfully connect to gdbserver and start a program >> > on the target; however, gdb is unable to fetch registers and instead >> > shows as follow: >> > >> > (gdb) info registers >> > r0 >> > r1 >> > r2 >> > r3 >> > r4 >> > r5 >> > r6 >> > r7 >> > r8 >> > r9 >> > r10 >> > r11 >> > r12 >> > r13 >> > r14 >> > r15 >> > pc >> > >> > Find attached full `gdbserver --debug --remote-debug` logs as well as >> > gdb logs. >> >> You should consider using 'set debug remote 1' on the GDB side to >> capture the remote packets from that perspective. I'm particularlly >> interested in the reply to the 'g' packet, but the complete logs would >> be useful. This information doesn't seem to be visible in the gdbserver >> output (or I'm missing it). > > Please, find attached similar gdb and gdbserver logs; with `set debug > remote 1` used on the GDB side. > >> >> Thanks, >> Andrew >> >> > >> > Any idea what might have been missed while implementing gdbserver support ? >> > Would you suggest ways to debug the issue ? >> > tambewilliam@kubuntu20200502:~$ sudo /opt/pu32-toolchain/bin/pu32-elf-gdb -x buildroot-build/staging/usr/share/buildroot/gdbinit -ex 'target extended-remote /dev/ttyUSB2' -ex 'set cwd /' && -ex 'monitor set debug 1' -ex 'monitor set remote-debug 1' >> > GNU gdb (GDB) 11.0.50.20210718-git >> > Copyright (C) 2021 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 "--host=x86_64-pc-linux-gnu --target=pu32-elf". >> > 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". >> > warning: File "/home/tambewilliam/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". >> > To enable execution of this file add >> > add-auto-load-safe-path /home/tambewilliam/.gdbinit >> > line to your configuration file "/root/.config/gdb/gdbinit". >> > To completely disable this security protection add >> > set auto-load safe-path / >> > line to your configuration file "/root/.config/gdb/gdbinit". >> > For more information about this security protection see the >> > "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: >> > info "(gdb)Auto-loading safe path" >> > buildroot-build/staging/usr/share/buildroot/gdbinit: No such file or directory. >> > Remote debugging using /dev/ttyUSB2 >> > (gdb) set remote exec-file /bin/ls >> > (gdb) r -l / >> > Starting program: -l / >> > Reading /usr/bin/busybox from remote target... >> > warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead. >> > Reading /usr/bin/busybox from remote target... >> > Reading symbols from target:/usr/bin/busybox... >> > (No debugging symbols found in target:/usr/bin/busybox) >> > warning: Target-supplied registers are not supported by the current architecture >> > PC register is not available >> > (gdb) info registers >> > r0 >> > r1 >> > r2 >> > r3 >> > r4 >> > r5 >> > r6 >> > r7 >> > r8 >> > r9 >> > r10 >> > r11 >> > r12 >> > r13 >> > r14 >> > r15 >> > pc >> > (gdb) >> > # gdbserver --debug --remote-debug --multi /dev/ttyS1 & >> > [2] 94 >> > root@buildroot:~ >> > # sigchld_handler >> > sigchld_handler >> > sigchld_handler >> > sigchld_handler >> > sigchld_handler >> > Remote debugging using /dev/ttyS1 >> > >> > root@buildroot:~ >> > # >> > root@buildroot:~ >> > # >> > root@buildroot:~ >> > # >> > root@buildroot:~ >> > # handling possible serial event >> > [getpkt: discarding char '+'] >> > getpkt ("qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+;memory-tagging+"); [sending ack] >> > [sent ack] >> > putpkt ("$PacketSize=47ff;QPassSignals+;QProgramSignals+;QStartupWithShell+;QEnvironmentHexEncoded+;QEnvironmentReset+;QEnvironmentUnset+;QSetWorkingDir+;qXfer:libraries-svr4:read+;augmented-libraries-svr4-read+;qXfer:auxv:read+;qXfer:siginfo:read+;qXfer:siginfo:write+;qXfer:features:read+;qXfer:osdata:read+;multiprocess+;fork-events+;vfork-events+;exec-events+;QNonStop+;QDisableRandomization+;qXfer:threads:read+;ConditionalBreakpoints+;BreakpointCommands+;QAgent+;Qbtrace:bts+;Qbtrace-conf:bts:size+;Qbtrace:pt+;Qbtrace-conf:pt:size+;Qbtrace:off+;qXfer:btrace:read+;qXfer:btrace-conf:read+;swbreak+;hwbreak+;qXfer:exec-file:read+;vContSupported+;QThreadEvents+;no-resumed+#21"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vMustReplyEmpty"); [sending ack] >> > [sent ack] >> > putpkt ("$#00"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("!"); [sending ack] >> > [sent ack] >> > putpkt ("$OK#9a"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("QProgramSignals:0;1;3;4;6;7;8;9;a;b;c;d;e;f;10;11;12;13;14;15;16;17;18;19;1a;1b;1c;1d;1e;1f;20;21;22;23;24;25;26;27;28;29;2a;2b;2c;2d;2e;2f;30;31;32;33;34;35;36;37;38;39;3a;3b;3c;3d;3e;3f;40;41;42;43;44;45;46;47;48;49;4a;4b;4c;4d;4e;4f;50;51;52;53;54;55;56;57;58;59;5a;5b;5c;5d;5e;5f;60;61;62;63;64;65;66;67;68;69;6a;6b;6c;6d;6e;6f;70;71;72;73;74;75;76;77;78;79;7a;7b;7c;7d;7e;7f;80;81;82;83;84;85;86;87;88;89;8a;8b;8c;8d;8e;8f;90;91;92;93;94;95;96;97;"); [sending ack] >> > [sent ack] >> > putpkt ("$OK#9a"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("Hgp0.0"); [sending ack] >> > [sent ack] >> > putpkt ("$E01#a6"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("qXfer:features:read:target.xml:0,1000"); [sending ack] >> > [sent ack] >> > putpkt ("$E01#a6"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("QNonStop:0"); [sending ack] >> > [sent ack] >> > linux_async (0), previous=0 >> > [all-stop mode enabled] >> > putpkt ("$OK#9a"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("qTStatus"); [sending ack] >> > [sent ack] >> > putpkt ("$#00"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("?"); [sending ack] >> > [sent ack] >> >>>>> entering void linux_process_target::stop_all_lwps(int, lwp_info*) >> > stop_all_lwps (stop, except=none) >> > wait_for_sigstop: pulling events >> > LWFE: waitpid(-1, ...) returned -1, >> > LLW: exit (no unwaited-for LWP) >> > stop_all_lwps done, setting stopping_threads back to !stopping >> > <<<< exiting void linux_process_target::stop_all_lwps(int, lwp_info*) >> > putpkt ("$W00#b7"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("QDisableRandomization:1"); [sending ack] >> > [sent ack] >> > [address space randomization disabled] >> > putpkt ("$OK#9a"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("QStartupWithShell:1"); [sending ack] >> > [sent ack] >> > [Inferior will be started with shell]putpkt ("$OK#9a"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("QEnvironmentReset"); [sending ack] >> > [sent ack] >> > putpkt ("$OK#9a"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("QSetWorkingDir:2f"); [sending ack] >> > [sent ack] >> > [Set the inferior's current directory to /] >> > putpkt ("$OK#9a"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vRun;2f62696e2f6c73;2d6c;2f"); [sending ack] >> > [sent ack] >> > args: -l / >> >>>>> entering ptid_t linux_process_target::wait_1(ptid_t, target_waitstatus*, target_wait_flags) >> > wait_1: [Process 97] >> > LWFE: waitpid(-1, ...) returned 0, ERRNO-OK >> > leader_pid=97, leader_lp!=NULL=1, num_lwps=1, zombie=0 >> > sigsuspend'ing >> > sigchld_handler >> > LWFE: waitpid(-1, ...) returned 97, ERRNO-OK >> > LLW: waitpid 97 received SIGTRAP - Trace/breakpoint trap (stopped) >> > LWFE: waitpid(-1, ...) returned 0, ERRNO-OK >> > Hit a non-gdbserver trap event. >> >>>>> entering void linux_process_target::stop_all_lwps(int, lwp_info*) >> > stop_all_lwps (stop, except=none) >> > wait_for_sigstop: pulling events >> > LWFE: waitpid(-1, ...) returned 0, ERRNO-OK >> > leader_pid=97, leader_lp!=NULL=1, num_lwps=1, zombie=0 >> > LLW: exit (no unwaited-for LWP) >> > stop_all_lwps done, setting stopping_threads back to !stopping >> > <<<< exiting void linux_process_target::stop_all_lwps(int, lwp_info*) >> > Checking whether LWP 97 needs to move out of the jump pad...no >> > wait_1 ret = LWP 97.97, 1, 5 >> > <<<< exiting ptid_t linux_process_target::wait_1(ptid_t, target_waitstatus*, target_wait_flags) >> >>>>> entering virtual void linux_process_target::resume(thread_resume*, size_t) >> > linux_resume: >> > already continuing LWP 97 at GDB's request >> > Resuming, no pending status or step over needed >> > linux_resume done >> > <<<< exiting virtual void linux_process_target::resume(thread_resume*, size_t) >> >>>>> entering ptid_t linux_process_target::wait_1(ptid_t, target_waitstatus*, target_wait_flags) >> > wait_1: [Process 97] >> > LWFE: waitpid(-1, ...) returned 0, ERRNO-OK >> > RSRL: resuming stopped-resumed LWP LWP 97.97 at 0: step=0 >> > Resuming lwp 97 (continue, signal 0, stop not expected) >> > leader_pid=97, leader_lp!=NULL=1, num_lwps=1, zombie=0 >> > sigsuspend'ing >> > sigchld_handler >> > LWFE: waitpid(-1, ...) returned 97, ERRNO-OK >> > LLW: waitpid 97 received SIGTRAP - Trace/breakpoint trap (stopped) >> > LWFE: waitpid(-1, ...) returned 0, ERRNO-OK >> > Hit a non-gdbserver trap event. >> >>>>> entering void linux_process_target::stop_all_lwps(int, lwp_info*) >> > stop_all_lwps (stop, except=none) >> > wait_for_sigstop: pulling events >> > LWFE: waitpid(-1, ...) returned 0, ERRNO-OK >> > leader_pid=97, leader_lp!=NULL=1, num_lwps=1, zombie=0 >> > LLW: exit (no unwaited-for LWP) >> > stop_all_lwps done, setting stopping_threads back to !stopping >> > <<<< exiting void linux_process_target::stop_all_lwps(int, lwp_info*) >> > Checking whether LWP 97 needs to move out of the jump pad...no >> > wait_1 ret = LWP 97.97, 1, 5 >> > <<<< exiting ptid_t linux_process_target::wait_1(ptid_t, target_waitstatus*, target_wait_flags) >> > Process /bin/ls created; pid = 97 >> > Writing resume reply for LWP 97.97:1 >> > putpkt ("$T0500:0*"00;0e:0*"00;0f:0*"00;10:0*"00;thread:p61.61;core:0;#90"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("qAttached:61"); [sending ack] >> > [sent ack] >> > putpkt ("$0#30"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("qXfer:exec-file:read:61:0,1000"); [sending ack] >> > [sent ack] >> > putpkt ("$l/usr/bin/busybox#98"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:setfs:0"); [sending ack] >> > [sent ack] >> > putpkt ("$F0#76"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:open:6a7573742070726f62696e67,0,1c0"); [sending ack] >> > [sent ack] >> > putpkt ("$F-1,2#02"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:setfs:61"); [sending ack] >> > [sent ack] >> > putpkt ("$F0#76"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:open:2f7573722f62696e2f62757379626f78,0,0"); [sending ack] >> > [sent ack] >> > putpkt ("$F4#7a"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:pread:4,47ff,0"); [sending ack] >> > [sent ack] >> > putpkt ("$F4734;ELF"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:pread:4,47ff,1ce288"); [sending ack] >> > [sent ack] >> > putpkt ("$F370;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:fstat:4"); [sending ack] >> > [sent ack] >> > putpkt ("$F40;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:pread:4,47ff,34"); [sending ack] >> > [sent ack] >> > putpkt ("$F4733;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:pread:4,47ff,1ce1a1"); [sending ack] >> > [sent ack] >> > putpkt ("$F457;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:pread:4,47ff,b4"); [sending ack] >> > [sent ack] >> > putpkt ("$F4733;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:fstat:4"); [sending ack] >> > [sent ack] >> > putpkt ("$F40;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:open:2f7573722f62696e2f62757379626f78,0,0"); [sending ack] >> > [sent ack] >> > putpkt ("$F5#7b"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:pread:5,47ff,0"); [sending ack] >> > [sent ack] >> > putpkt ("$F4734;ELF"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:pread:5,47ff,1ce288"); [sending ack] >> > [sent ack] >> > putpkt ("$F370;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:fstat:5"); [sending ack] >> > [sent ack] >> > putpkt ("$F40;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:pread:5,47ff,34"); [sending ack] >> > [sent ack] >> > putpkt ("$F4733;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:pread:5,47ff,1ce1a1"); [sending ack] >> > [sent ack] >> > putpkt ("$F457;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:pread:5,47ff,b4"); [sending ack] >> > [sent ack] >> > putpkt ("$F4733;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:fstat:5"); [sending ack] >> > [sent ack] >> > putpkt ("$F40;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("qSymbol::"); [sending ack] >> > [sent ack] >> > Trying host libthread_db library: libthread_db.so.1. >> > dlopen failed: libthread_db.so.1: cannot open shared object file: No such file or directory. >> > thread_db_load_search returning 0 >> > putpkt ("$OK#9a"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("qSymbol::"); [sending ack] >> > [sent ack] >> > Trying host libthread_db library: libthread_db.so.1. >> > dlopen failed: libthread_db.so.1: cannot open shared object file: No such file or directory. >> > thread_db_load_search returning 0 >> > putpkt ("$OK#9a"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("qXfer:exec-file:read:61:0,1000"); [sending ack] >> > [sent ack] >> > putpkt ("$l/usr/bin/busybox#98"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("qOffsets"); [sending ack] >> > [sent ack] >> > putpkt ("$#00"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("Hgp61.61"); [sending ack] >> > [sent ack] >> > putpkt ("$OK#9a"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("qXfer:features:read:target.xml:0,1000"); [sending ack] >> > [sent ack] >> > putpkt ("$l >> > >> > >> > pu32 >> > GNU/Linux >> > >> > * >> > * >> > * >> > * >> > * >> > * >> > * >> > * >> > * >> > * >> > * >> > * >> > * >> > * >> > * >> > * >> > * >> > >> > >> > #ef"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("vFile:pread:4,47ff,b4"); [sending ack] >> > [sent ack] >> > putpkt ("$F4733;"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("g"); [sending ack] >> > [sent ack] >> > putpkt ("$x*}x*C#04"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("qXfer:libraries-svr4:read::0,1000"); [sending ack] >> > [sent ack] >> > putpkt ("$E01#a6"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("qXfer:auxv:read::0,1000"); [sending ack] >> > [sent ack] >> > putpkt ("$l"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000034,20"); [sending ack] >> > [sent ack] >> > putpkt ("$010*050*"050f9cb1c00f9cb1c00050*"0010*!#ce"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000054,20"); [sending ack] >> > [sent ack] >> > putpkt ("$010*"fccb1c00fcdb1c50fcdb1c50a5150* 1c370*!60*"0010*!#1c"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000074,20"); [sending ack] >> > [sent ack] >> > putpkt ("$040*"b40*"b40* 50b40* 5020*"020*"0040*"040*"#58"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000094,20"); [sending ack] >> > [sent ack] >> > putpkt ("$070*"fccb1c00fcdb1c50fcdb1c50180*"540*"040*"040*"#ff"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000034,20"); [sending ack] >> > [sent ack] >> > putpkt ("$010*050*"050f9cb1c00f9cb1c00050*"0010*!#ce"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000054,20"); [sending ack] >> > [sent ack] >> > putpkt ("$010*"fccb1c00fcdb1c50fcdb1c50a5150* 1c370*!60*"0010*!#1c"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000074,20"); [sending ack] >> > [sent ack] >> > putpkt ("$040*"b40*"b40* 50b40* 5020*"020*"0040*"040*"#58"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000094,20"); [sending ack] >> > [sent ack] >> > putpkt ("$070*"fccb1c00fcdb1c50fcdb1c50180*"540*"040*"040*"#ff"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000034,20"); [sending ack] >> > [sent ack] >> > putpkt ("$010*050*"050f9cb1c00f9cb1c00050*"0010*!#ce"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000054,20"); [sending ack] >> > [sent ack] >> > putpkt ("$010*"fccb1c00fcdb1c50fcdb1c50a5150* 1c370*!60*"0010*!#1c"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000074,20"); [sending ack] >> > [sent ack] >> > putpkt ("$040*"b40*"b40* 50b40* 5020*"020*"0040*"040*"#58"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000094,20"); [sending ack] >> > [sent ack] >> > putpkt ("$070*"fccb1c00fcdb1c50fcdb1c50180*"540*"040*"040*"#ff"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000034,20"); [sending ack] >> > [sent ack] >> > putpkt ("$010*050*"050f9cb1c00f9cb1c00050*"0010*!#ce"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000054,20"); [sending ack] >> > [sent ack] >> > putpkt ("$010*"fccb1c00fcdb1c50fcdb1c50a5150* 1c370*!60*"0010*!#1c"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000074,20"); [sending ack] >> > [sent ack] >> > putpkt ("$040*"b40*"b40* 50b40* 5020*"020*"0040*"040*"#58"); [looking for ack] >> > [received '+' (0x2b)] >> > handling possible serial event >> > getpkt ("m50000094,20"); [sending ack] >> > [sent ack] >> > putpkt ("$070*"fccb1c00fcdb1c50fcdb1c50180*"540*"040*"040*"#ff"); [looking for ack] >> > [received '+' (0x2b)] >> > >> > root@buildroot:~ >> > tambewilliam@kubuntu20200502:~$ sudo /opt/pu32-toolchain/bin/pu32-elf-gdb -x ~/Documents/buildroot-build/staging/usr/share/buildroot/gdbinit -ex 'cd /home/tambewilliam/Documents/buildroot-build/staging/' -ex 'target extended-remote /dev/ttyUSB2' -ex 'set cwd /' -ex 'monitor set debug 1' -ex 'monitor set remote-debug 1' -ex 'set debug remote 1' > GNU gdb (GDB) 11.0.50.20210718-git > Copyright (C) 2021 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 "--host=x86_64-pc-linux-gnu --target=pu32-elf". > 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". > warning: File "/home/tambewilliam/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". > To enable execution of this file add > add-auto-load-safe-path /home/tambewilliam/.gdbinit > line to your configuration file "/root/.config/gdb/gdbinit". > To completely disable this security protection add > set auto-load safe-path / > line to your configuration file "/root/.config/gdb/gdbinit". > For more information about this security protection see the > "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: > info "(gdb)Auto-loading safe path" > Working directory /home/tambewilliam/Documents/buildroot-build/staging > (canonically /home/tambewilliam/Documents/buildroot-build/host/pu32-buildroot-linux-gnu/sysroot). > Remote debugging using /dev/ttyUSB2 > Debug output enabled. > Protocol debug output enabled. > (gdb) set remote exec-file bin/ls > (gdb) file bin/ls > Reading symbols from bin/ls... > (gdb) > (gdb) r -l / > Starting program: /home/tambewilliam/Documents/buildroot-build/host/pu32-buildroot-linux-gnu/sysroot/usr/bin/ls -l / > [remote] Sending packet: $QDisableRandomization:1#cf > [remote] Received Ack > [remote] Packet received: OK > [remote] Sending packet: $QStartupWithShell:1#43 > [remote] Received Ack > [remote] Packet received: OK > [remote] Sending packet: $QEnvironmentReset#e9 > [remote] Received Ack > [remote] Packet received: OK > [remote] Sending packet: $QSetWorkingDir:2f#4f > [remote] Received Ack > [remote] Packet received: OK > [remote] Sending packet: $vRun;62696e2f6c73;2d6c;2f#30 > [remote] Received Ack > [remote] Packet received: T0500:00000000;0e:00000000;0f:00000000;10:00000000;thread:p5b.5b;core:0; > [remote] packet_ok: Packet vRun (run) is supported > [remote] Sending packet: $qAttached:5b#60 > [remote] Received Ack > [remote] Packet received: 0 > [remote] packet_ok: Packet qAttached (query-attached) is supported > [remote] Sending packet: $qXfer:exec-file:read:5b:0,1000#b0 > [remote] Received Ack > [remote] Packet received: l/usr/bin/busybox > [remote] Sending packet: $qOffsets#4b > [remote] Received Ack > [remote] Packet received: > [remote] Sending packet: $Hgp5b.5b#7b > [remote] Received Ack > [remote] Packet received: OK > [remote] Sending packet: $qXfer:features:read:target.xml:0,1000#0c > [remote] Received Ack > [remote] Packet received: l\n\n\n pu32\n GNU/Linux\n \n \n \n \n \n \n