答复: GDB: ARM: regression: thumb-bx-pc.exp
赵俊涛
juntao_zhao@realsil.com.cn
Mon Oct 21 02:58:00 GMT 2019
Hi,
There's still this issue in GDB-8.3.1.
It appears that GDB does not read the ARM mapping symbol when the file command is executed again. Therefore, after the second file command, GDB only holds the minimal symbol table, and no ARM mapping symbol, so GDB takes the ARM instructions as thumb instructions by mistake.
-----邮件原件-----
发件人: Luis Machado [mailto:luis.machado@linaro.org]
发送时间: 2019年10月18日 22:16
收件人: 赵俊涛; gdb@sourceware.org
主题: Re: GDB: ARM: regression: thumb-bx-pc.exp
Hi,
On 7/10/19 12:59 AM, 赵俊涛 wrote:
> Hi,
> When I was doing a regression test, I found a problem from thumb-bx-pc.exp. I load a symbol table by file command, then I use ‘disassemble main’ command and the result is correct.
> When I use file command again to load the same symbol table, the result of ‘disassemble main’ is wrong. Here's the log.
>
> GNU gdb (GDB) 8.2
> Copyright (C) 2018 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> 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=arm-elf-eabi".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
>
> For help, type "help".
> Type "apropos word" to search for commands related to "word".
> (gdb) file "/home/juntao_zhao/debugger/test/8_2_repo_sdlc/run/outputs/gdb.arch/thumb-bx-pc/thumb-bx-pc"
> Reading symbols from /home/juntao_zhao/debugger/test/8_2_repo_sdlc/run/outputs/gdb.arch/thumb-bx-pc/thumb-bx-pc...done.
> (gdb) disassemble main
> Dump of assembler code for function main:
> 0x0000821c <+0>: bx pc
> 0x0000821e <+2>: nop
> 0x00008220 <+4>: mov r0, #0
> 0x00008224 <+8>: bx lr
> End of assembler dump.
> (gdb) file "/home/juntao_zhao/debugger/test/8_2_repo_sdlc/run/outputs/gdb.arch/thumb-bx-pc/thumb-bx-pc"
> Load new symbol table from "/home/juntao_zhao/debugger/test/8_2_repo_sdlc/run/outputs/gdb.arch/thumb-bx-pc/thumb-bx-pc"? (y or n) y
> Reading symbols from /home/juntao_zhao/debugger/test/8_2_repo_sdlc/run/outputs/gdb.arch/thumb-bx-pc/thumb-bx-pc...done.
> (gdb) disassemble main
> Dump of assembler code for function main:
> 0x0000821c <+0>: bx pc
> 0x0000821e <+2>: nop
> 0x00008220 <+4>: movs r0, r0
> 0x00008222 <+6>: b.n 0x8966
> 0x00008224 <+8>: vrhadd.u16 d14, d14, d31
> End of assembler dump.
>
> I'm surprised and I don't know why. Could you give me some advice?
>
> -----------------------------------------------------------------------
> e-mail: juntao_zhao@realsil.com.cn
> Ext. 55311
> -----------------------------------------------------------------------
>
>
Could you please test with a more recent GDB and confirm if this is
still an issue?
------Please consider the environment before printing this e-mail.
More information about the Gdb
mailing list