mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
Revert "segfault at i386-dis.c:9815"
This reverts commit 92d450c79a.
Accessing these local var structs using a volatile qualified pointer
may indeed read the object, but I don't think changed values are
guaranteed to be written back to the object unless the actual object
is declared volatile. That would probably slow down i386 disassembly
unacceptably.
This commit is contained in:
@@ -9808,17 +9808,12 @@ print_insn (bfd_vma pc, disassemble_info *info, int intel_syntax)
|
||||
/* Getting here means we tried for data but didn't get it. That
|
||||
means we have an incomplete instruction of some sort. Just
|
||||
print the first byte as a prefix or a .byte pseudo-op. */
|
||||
volatile struct dis_private *ppriv = &priv;
|
||||
volatile instr_info *pins = &ins;
|
||||
if (pins->codep > ppriv->the_buffer)
|
||||
if (ins.codep > priv.the_buffer)
|
||||
{
|
||||
const char *name = NULL;
|
||||
|
||||
if (pins->prefixes
|
||||
|| pins->fwait_prefix >= 0
|
||||
|| (pins->rex & REX_OPCODE))
|
||||
name = prefix_name (&ins, ppriv->the_buffer[0],
|
||||
ppriv->orig_sizeflag);
|
||||
if (ins.prefixes || ins.fwait_prefix >= 0 || (ins.rex & REX_OPCODE))
|
||||
name = prefix_name (&ins, priv.the_buffer[0], priv.orig_sizeflag);
|
||||
if (name != NULL)
|
||||
i386_dis_printf (&ins, dis_style_mnemonic, "%s", name);
|
||||
else
|
||||
@@ -9827,7 +9822,7 @@ print_insn (bfd_vma pc, disassemble_info *info, int intel_syntax)
|
||||
i386_dis_printf (&ins, dis_style_assembler_directive,
|
||||
".byte ");
|
||||
i386_dis_printf (&ins, dis_style_immediate, "0x%x",
|
||||
(unsigned int) ppriv->the_buffer[0]);
|
||||
(unsigned int) priv.the_buffer[0]);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user