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: [RFC][patch] Allow to disassemble line.


> Perhaps it is reasonable to get rid of the parameter, and just say that
> 'disas/l' always disassembles current line, [...]

Not necessarily. Perhaps we could look at the /l as a qualifier which
allows the user to specify that he's not going to provide a range, or
a start address, but rather one address that's part of a line.  GDB
is to understand this as a request to disassemble the block of
instruction corresponding to the line corresponding to that address.

When looking at it this way, adding support for "foo.c:22" becomes
orthogonal to the introduction of the /l modifier. For instance,
you could do "disass /l" which, without argument, would access
the default value which conceptually is the $pc of the currently
selected frame.

We can also independently add FILE:LINE as a valid location expression
and make it work regardless of whether the /l modifier is used or not.

What I propose we do, for now, is not worry too much if the line of code
is split in multiple instruction blocks. Let's just print the first one,
for instance. There is no reason why we cannot deal with that later if
needed.

-- 
Joel


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