This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] print error message if (auto) disassembly failed


> > 2009-04-17  Joel Brobecker  <brobecker@adacore.com>
> > 
> >         * stack.c (do_gdb_disassembly): Print an error message if an error
> >         was thrown while trying to perform the disassembly.
> > 
> > I'm currently testing this patch on x86_64-linux, but I don't really
> > expect any problem.
> 
> My two cents: this should really match whatever x/i does.  Is that
> code now shared, or does it still have the old (IMO perfectly fine)
> error message?

The code is not shared. They both call gdbarch_print_insn to print
the instruction but from different code paths. In the "x/i" case,
I think that the top-level command exception handler ends up printing
the exception message.  In the case at hand, do_gdb_disassembly traps
the exception. What my first patch does is just print the exception
message to give the user a clue of what's going on.  What the second
patch adds is a bit of extra code to handle memory errors differently,
in order to print the shorter error message.

Since we can decide on the particular error message we want for
memory errors is only midly related to the issue of printing something,
I suggest I commit my first patch, and let Eli promote the idea of
his shorter error message. I agree to write and test the change,
but I don't want to spend time discussing something that I think
is only cosmetic.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]