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: [patch v4 01/13] disas: add precise instructions flag


> -----Original Message-----
> From: Pedro Alves [mailto:palves@redhat.com]
> Sent: Tuesday, November 27, 2012 6:33 PM
> To: Metzger, Markus T
> Cc: gdb-patches@sourceware.org; markus.t.metzger@gmail.com; jan.kratochvil@redhat.com; tromey@redhat.com;
> kettenis@gnu.org
> Subject: Re: [patch v4 01/13] disas: add precise instructions flag
> 
> On 11/27/2012 05:26 PM, Metzger, Markus T wrote:
> 
> >> From: Pedro Alves [mailto:palves@redhat.com]
> 
> >>> the addresses that
> >>> are being disassembled may not exactly match the specified range.
> >>
> >> Is this another symptom of the issue that "disasm /m" sorts by
> >> line number, rather than the much more reasonable sort-by-address,
> >> which is IIRC what objdump does too?
> >
> > Yes. I didn't want to go that far.
> >
> > The patch is incomplete. It merely truncates the first and last block that gdb prints. If you wanted to change the behavior of "disasm
> /m", anyway, we can discard this patch. Sort-by-address is exactly what I'm looking for. Is somebody already working on this?
> 
> I've never heard of anyone who actually likes the current behavior.  On the
> contrary, I've heard several of the gdb developers wanting it the other way.
> But I'm not aware of anyone working on it.  I'm not sure how hard is it
> to implement.  Both gdb and objdump use libopcodes to disassemble, so
> one would think that it's quite doable.  I think a wrinkle may be that
> the TUI uses the same code and the current sorting may (or not) make sense there
> I think the /m flag was just implemented as reusing the TUI code to begin with.

My test suite does not depend on it. I just noticed it when I used the feature.

I'll drop this patch and look into fixing "disasm /m", instead.

Thanks,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Peter Gleissner, Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052


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