This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: convenience variables in "target remote"
- From: Daniel Jacobowitz <drow at false dot org>
- To: Vladimir Prus <ghost at cs dot msu dot su>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 10 Nov 2005 08:43:40 -0500
- Subject: Re: convenience variables in "target remote"
- References: <dkv7eq$v86$1@sea.gmane.org>
On Thu, Nov 10, 2005 at 01:29:46PM +0300, Vladimir Prus wrote:
>
> Hi,
> it looks like "target remote" command does not handle convenience variables
> properly:
>
> (gdb) set $var=1234
> (gdb) target remote :$var
> :$var: Connection refused.
> (gdb) target remote :1234
> Remote debugging using :1234
>
> When $var is used, it's not expanded, at gdb tries to connect to the wrong
> port?
>
> Is this by design, or a bug?
Convenience variables are expanded in roughly the same places that the
(C) expression evaluator is used to parse expressions. Most places
that take a number do not support them; that's by design, the full
range of expressions are not supported for ports.
--
Daniel Jacobowitz
CodeSourcery, LLC