From: "Maciej W. Rozycki" <macro@imgtec.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: <binutils@sourceware.org>, <gdb-patches@sourceware.org>,
Alan Modra <amodra@gmail.com>
Subject: Re: [PATCH] GDB/opcodes: Remove arch/mach/endian disassembler assertions
Date: Thu, 03 Aug 2017 12:25:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.00.1708031320590.17596@tp.orcam.me.uk> (raw)
In-Reply-To: <alpine.DEB.2.00.1708031235270.17596@tp.orcam.me.uk>
On Thu, 3 Aug 2017, Maciej W. Rozycki wrote:
> > I prefer to keep these asserts, as they could check the inconsistent
> > uses of disassemble_info between gdb and opcodes. There is another
> > assert for target armv5te, PR 21818, but the assert exposes an improper
> > or unexpected usage of disassemble_info.mach in opcodes/arm-dis.c. I am
> > fixing it.
>
> How does the retaining of these assertions interact with `set
> architecture' and `set endian' then?
E.g.:
$ x86_64-linux-gnu-gdb
GNU gdb (GDB) 8.0.50.20170729-git
Copyright (C) 2017 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 "x86_64-pc-linux-gnu".
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 main86
Reading symbols from main86...(no debugging symbols found)...done.
(gdb) show architecture
The target architecture is set automatically (currently i386:x86-64)
(gdb) disassemble main
Dump of assembler code for function main:
0x0000000000400450 <+0>: xor %eax,%eax
0x0000000000400452 <+2>: retq
End of assembler dump.
(gdb) set architecture i386
The target architecture is assumed to be i386
(gdb) disassemble main
Dump of assembler code for function main:
0x00400450 <+0>:
.../gdb/arch-utils.c:979: internal-error: int default_print_insn(bfd_vma, disassemble_info*): Assertion `info->mach == bfd_get_mach (exec_bfd)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n
This is a bug, please report it. For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.
.../gdb/arch-utils.c:979: internal-error: int default_print_insn(bfd_vma, disassemble_info*): Assertion `info->mach == bfd_get_mach (exec_bfd)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
Command aborted.
(gdb)
A change applied to the MIPS backend obviously won't do anything here.
Maciej
next prev parent reply other threads:[~2017-08-03 12:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 16:39 Maciej W. Rozycki
2017-08-03 11:04 ` Yao Qi
2017-08-03 11:36 ` Maciej W. Rozycki
2017-08-03 12:25 ` Maciej W. Rozycki [this message]
2017-08-04 10:49 ` Yao Qi
2017-08-07 13:24 ` Alan Modra
2017-08-07 14:56 ` Maciej W. Rozycki
2017-08-07 15:05 ` H.J. Lu
2017-08-07 15:15 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.00.1708031320590.17596@tp.orcam.me.uk \
--to=macro@imgtec.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox