* [Bug symtab/15103] disassemble file:function should work
2013-02-05 21:47 [Bug symtab/15103] New: disassemble file:function should work dje at google dot com
@ 2013-02-06 12:18 ` tromey at redhat dot com
2013-02-06 18:19 ` dje at google dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: tromey at redhat dot com @ 2013-02-06 12:18 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15103
Tom Tromey <tromey at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at redhat dot com
--- Comment #1 from Tom Tromey <tromey at redhat dot com> 2013-02-06 12:18:03 UTC ---
(In reply to comment #0)
> If "b p-exp.y:parse_number" works,
> why doesn't "disas p-exp.y:parse_number" ?
disassemble takes expressions, not linespecs.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/15103] disassemble file:function should work
2013-02-05 21:47 [Bug symtab/15103] New: disassemble file:function should work dje at google dot com
2013-02-06 12:18 ` [Bug symtab/15103] " tromey at redhat dot com
@ 2013-02-06 18:19 ` dje at google dot com
2013-02-06 18:23 ` dje at google dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dje at google dot com @ 2013-02-06 18:19 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15103
--- Comment #2 from dje at google dot com 2013-02-06 18:19:18 UTC ---
Re: disassemble takes expressions, not linespecs.
That's not really my point though, is it.
Let's take a step back.
How do I explain to a user that while, yes, s/he can set a breakpoint on
p-exp.y:parse_number, s/he cannot disassemble it (in any easy way).
I could be missing something of course.
btw, somewhat related and somewhat tangential, I think we'll want to expand
expressions to take file names.
How do I (easily) print foo.c:baz instead of bar.c:baz from an arbitrary point
in the program?
"print foo.c:baz" is the obvious choice of course, but I if necessary (and
acceptable) I could see "print -f foo.c baz". It does preclude expressions
based on multiple files, but I can live with that.
[Some might want /X instead of -f, where X is some as yet unused display option
for print, but I'm not convinced it's better.]
[Again, this is all assuming "print foo.c:baz" can't work.
Plus, while linespecs don't always rquire filenames to be quoted, I could live
with "print 'foo.c':baz" too, if necessary.]
But getting back to disassemble,
from a u/i perspective I can't rationalize the current behaviour.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/15103] disassemble file:function should work
2013-02-05 21:47 [Bug symtab/15103] New: disassemble file:function should work dje at google dot com
2013-02-06 12:18 ` [Bug symtab/15103] " tromey at redhat dot com
2013-02-06 18:19 ` dje at google dot com
@ 2013-02-06 18:23 ` dje at google dot com
2013-02-06 18:29 ` tromey at redhat dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dje at google dot com @ 2013-02-06 18:23 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15103
--- Comment #3 from dje at google dot com 2013-02-06 18:23:02 UTC ---
btw, for completeness sake, and all that :-)
I realize one can do "info line p-exp.y:parse_number", examine the output,
and pass that to disassemble. But it's a hack, not a solution.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/15103] disassemble file:function should work
2013-02-05 21:47 [Bug symtab/15103] New: disassemble file:function should work dje at google dot com
` (2 preceding siblings ...)
2013-02-06 18:23 ` dje at google dot com
@ 2013-02-06 18:29 ` tromey at redhat dot com
2013-02-06 19:16 ` dje at google dot com
2023-02-10 18:42 ` tromey at sourceware dot org
5 siblings, 0 replies; 7+ messages in thread
From: tromey at redhat dot com @ 2013-02-06 18:29 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15103
--- Comment #4 from Tom Tromey <tromey at redhat dot com> 2013-02-06 18:29:23 UTC ---
(In reply to comment #2)
> Re: disassemble takes expressions, not linespecs.
>
> That's not really my point though, is it.
I didn't know. I thought it was an actual question.
> Let's take a step back.
> How do I explain to a user that while, yes, s/he can set a breakpoint on
> p-exp.y:parse_number, s/he cannot disassemble it (in any easy way).
> I could be missing something of course.
>
> btw, somewhat related and somewhat tangential, I think we'll want to expand
> expressions to take file names.
> How do I (easily) print foo.c:baz instead of bar.c:baz from an arbitrary point
> in the program?
There's already an extension for this.
Try: disassemble 'p-exp.y'::parse_number
> But getting back to disassemble,
> from a u/i perspective I can't rationalize the current behaviour.
Linespecs might have been a better choice, but the choice has already been
made.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/15103] disassemble file:function should work
2013-02-05 21:47 [Bug symtab/15103] New: disassemble file:function should work dje at google dot com
` (3 preceding siblings ...)
2013-02-06 18:29 ` tromey at redhat dot com
@ 2013-02-06 19:16 ` dje at google dot com
2023-02-10 18:42 ` tromey at sourceware dot org
5 siblings, 0 replies; 7+ messages in thread
From: dje at google dot com @ 2013-02-06 19:16 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15103
--- Comment #5 from dje at google dot com 2013-02-06 19:16:18 UTC ---
Blech. Silly me for applying sane rules of design to gdb.
It's break foo.c:bar, but it's disassemble 'foo.c'::bar.
Except that disassemble 'foo.c'::bar doesn't work if the current language is
c++,
which is what my testcase was written in when I checked whether it worked
[filed as http://sourceware.org/bugzilla/show_bug.cgi?id=15109]
I consider this bug still open though. :-)
At least until a compelling reason is given for why neither of the following
can be done:
1) allow :: in linespecs
2) allow : in disassemble, et.al.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/15103] disassemble file:function should work
2013-02-05 21:47 [Bug symtab/15103] New: disassemble file:function should work dje at google dot com
` (4 preceding siblings ...)
2013-02-06 19:16 ` dje at google dot com
@ 2023-02-10 18:42 ` tromey at sourceware dot org
5 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2023-02-10 18:42 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=15103
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
I found another spot where it would be better for disassemble
to take a linespec rather than an expression. Like Pascal, in
Ada a call of a parameter-less function does not require parens.
So you can end up with confusing output like:
(gdb) disassemble Mult_Float
Too few arguments in function call.
Oops, this is trying to call a function; you have to stick an "&"
or "'address" in there.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread