Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Make "j" an alias of "jump" [was: Re: "j" is now an ambiguous command]
       [not found] <alpine.LNX.2.01.1209160050010.13178@nerf07.vanv.qr>
@ 2012-09-18 19:44 ` Sergio Durigan Junior
  2012-09-18 19:51   ` Tom Tromey
  2012-09-18 20:07   ` Eli Zaretskii
  0 siblings, 2 replies; 4+ messages in thread
From: Sergio Durigan Junior @ 2012-09-18 19:44 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: gdb-patches

On Saturday, September 15 2012, Jan Engelhardt wrote:

> Between gdb-7.3 and 7.4.50.20120603, gdb has gained the two commands 
> "jit-reader-load" and "jit-reader-unload".
> This causes "j", previously used as a shortcut for "jump", to have 
> become ambiguous. I would ask for "j" to be recognized again, similar to 
> how "b" is synonymous with "break" despite the presence of other b* 
> commands.
>
>   (gdb) j 1762
> Ambiguous command "j 1762": jit-reader-load, jit-reader-unload, jump.

Thanks for the report.  I agree that "jump" is a command more used than
the "jit*" commands.

The following patch fixes the issue.

Ok to apply?

-- 
Sergio

gdb/ChangeLog:
2012-09-18  Sergio Durigan Junior  <sergiodj@redhat.com>

	* infcmd.c (_initialize_infcmd): Register `j' as an alias for
	`jump'.

gdb/doc/ChangeLog:
2012-09-18  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.texinfo (jump): Mention new alias `j' for `jump'.

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index cd4513b..ddcbbad 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -15495,8 +15495,11 @@ an address of your own choosing, with the following commands:
 
 @table @code
 @kindex jump
+@kindex j @r{(@code{jump})}
 @item jump @var{linespec}
+@itemx j @var{linespec}
 @itemx jump @var{location}
+@itemx j @var{location}
 Resume execution at line @var{linespec} or at address given by
 @var{location}.  Execution stops again immediately if there is a
 breakpoint there.  @xref{Specify Location}, for a description of the
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index cce624e..fd035df 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -3104,6 +3104,7 @@ Usage: jump <location>\n\
 Give as argument either LINENUM or *ADDR, where ADDR is an expression\n\
 for an address to start at."));
   set_cmd_completer (c, location_completer);
+  add_com_alias ("j", "jump", class_run, 1);
 
   if (xdb_commands)
     {


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Make "j" an alias of "jump" [was: Re: "j" is now an ambiguous command]
  2012-09-18 19:44 ` Make "j" an alias of "jump" [was: Re: "j" is now an ambiguous command] Sergio Durigan Junior
@ 2012-09-18 19:51   ` Tom Tromey
  2012-09-18 20:16     ` Sergio Durigan Junior
  2012-09-18 20:07   ` Eli Zaretskii
  1 sibling, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2012-09-18 19:51 UTC (permalink / raw)
  To: Sergio Durigan Junior; +Cc: Jan Engelhardt, gdb-patches

>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:

Sergio> 2012-09-18  Sergio Durigan Junior  <sergiodj@redhat.com>
Sergio> 	* infcmd.c (_initialize_infcmd): Register `j' as an alias for
Sergio> 	`jump'.

The code bits are ok.

Thanks for picking this up.

Tom


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Make "j" an alias of "jump" [was: Re: "j" is now an ambiguous command]
  2012-09-18 19:44 ` Make "j" an alias of "jump" [was: Re: "j" is now an ambiguous command] Sergio Durigan Junior
  2012-09-18 19:51   ` Tom Tromey
@ 2012-09-18 20:07   ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2012-09-18 20:07 UTC (permalink / raw)
  To: Sergio Durigan Junior; +Cc: jengelh, gdb-patches

> From: Sergio Durigan Junior <sergiodj@redhat.com>
> Cc: gdb-patches@sourceware.org
> Date: Tue, 18 Sep 2012 16:43:46 -0300
> 
> >   (gdb) j 1762
> > Ambiguous command "j 1762": jit-reader-load, jit-reader-unload, jump.
> 
> Thanks for the report.  I agree that "jump" is a command more used than
> the "jit*" commands.
> 
> The following patch fixes the issue.
> 
> Ok to apply?

The documentation part is OK, thanks.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Make "j" an alias of "jump" [was: Re: "j" is now an ambiguous command]
  2012-09-18 19:51   ` Tom Tromey
@ 2012-09-18 20:16     ` Sergio Durigan Junior
  0 siblings, 0 replies; 4+ messages in thread
From: Sergio Durigan Junior @ 2012-09-18 20:16 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Jan Engelhardt, gdb-patches, Eli Zaretskii

On Tuesday, September 18 2012, Tom Tromey wrote:

>>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:
>
> Sergio> 2012-09-18  Sergio Durigan Junior  <sergiodj@redhat.com>
> Sergio> 	* infcmd.c (_initialize_infcmd): Register `j' as an alias for
> Sergio> 	`jump'.
>
> The code bits are ok.
>
> Thanks for picking this up.

Thanks Tom and Eli.

Checked in:

        http://sourceware.org/ml/gdb-cvs/2012-09/msg00100.html

-- 
Sergio


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-18 20:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <alpine.LNX.2.01.1209160050010.13178@nerf07.vanv.qr>
2012-09-18 19:44 ` Make "j" an alias of "jump" [was: Re: "j" is now an ambiguous command] Sergio Durigan Junior
2012-09-18 19:51   ` Tom Tromey
2012-09-18 20:16     ` Sergio Durigan Junior
2012-09-18 20:07   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox