Article View: gnu.gdb.bug
Article #1125RE: Problem with user defined commands
From: Mohanasundaram Chandran
Date: Wed, 30 Jan 2013 10:52
Date: Wed, 30 Jan 2013 10:52
152 lines
7351 bytes
7351 bytes
--_fcb29a69-6cff-40db-ae17-97f4b631c3e5_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
A small correction in the test.gdb file which I pasted earlier. This is the=
correct one... bash-3.2$ cat test.gdb
define wsfoo
printf "wsfoo\n"
end
define foo
wsfoo
end
define bar
printf "bar\n"
end
From: mohanasundaram.subscribe@outlook.com
To: bug-gdb@gnu.org
Subject: Problem with user defined commands
Date: Wed=2C 30 Jan 2013 16:18:25 +0530
=0A=
=0A=
=0A=
Hi All=2C
=20
User defined commands gets messed up if a definition has a name starting wi=
th "ws" and called from another definition. Is it a known defect? Any worka=
rounds?
=20
bash-3.2$ cat test.gdb
define wsbaz
printf "wsbaz\n"
end
define foo
wsbaz
end
define bar
printf "bar\n"
end
=20
bash-3.2$ ./gdb
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation=2C Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.htm=
l>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY=2C to the extent permitted by law. Type "show copying=
"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions=2C please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) source ./test.gdb
(gdb) foo
warning: Invalid control type in canned commands structure.
warning: Error executing canned sequence of commands.
(gdb) bar
Undefined command: "bar". Try "help".
(gdb) show user foo
User command "foo":
wsfoo
end
define bar
printf "bar\n"
(gdb) show user bar
Undefined command: "bar". Try "help".
(gdb) show user wsfoo
User command "wsfoo":
printf "wsfoo\n"
(gdb) wsfoo
wsfoo
(gdb)
Cheers=2C
Mohan.
=20
=0A=
_______________________________________________=0A=
bug-gdb mailing list=0A=
bug-gdb@gnu.org=0A=
https://lists.gnu.org/mailman/listinfo/bug-gdb =
--_fcb29a69-6cff-40db-ae17-97f4b631c3e5_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 12pt=3B
font-family:Calibri
}
--></style></head>
<body class=3D'hmmessage'><div dir=3D'ltr'>A small correction in the test.g=
db file which I pasted earlier. =3BThis is the correct one...<BR> =
=3B<BR>bash-3.2$ cat test.gdb<br>define wsfoo<br> =3B =3B =3B&n=
bsp=3B =3B =3B =3B printf "wsfoo\n"<br>end<br>define foo<br>&nb=
sp=3B =3B =3B =3B =3B =3B =3B wsfoo<br>end<br>defin=
e bar<br> =3B =3B =3B =3B =3B =3B =3B printf "b=
ar\n"<br>end<br> =3B<BR><div><div id=3D"SkyDrivePlaceholder"></div><hr =
id=3D"stopSpelling">From: mohanasundaram.subscribe@outlook.com<br>To: bug-g=
db@gnu.org<br>Subject: Problem with user defined commands<br>Date: Wed=2C 3=
0 Jan 2013 16:18:25 +0530<br><br>=0A=
=0A=
<style><!--=0A=
.ExternalClass .ecxhmmessage P=0A=
{padding:0px=3B}=0A=
.ExternalClass body.ecxhmmessage=0A=
{font-size:12pt=3Bfont-family:Calibri=3B}=0A=
=0A=
--></style>=0A=
<div dir=3D"ltr">Hi All=2C<br> =3B<br>User defined commands gets messed=
up if a definition has a name starting with "ws" and called from another d=
efinition. Is it a known defect? Any workarounds?<br> =3B<br>bash-3.2$ =
cat test.gdb<br>define wsbaz<br> =3B =3B =3B =3B =3B&nb=
sp=3B =3B printf "wsbaz\n"<br>end<br>define foo<br> =3B =3B&nbs=
p=3B =3B =3B =3B =3B wsbaz<br>end<br>define bar<br> =3B=
 =3B =3B =3B =3B =3B =3B printf "bar\n"<br>end<br>&=
nbsp=3B<br>bash-3.2$ ./gdb<br>GNU gdb (GDB) 7.5.1<br>Copyright (C) 2012 Fre=
e Software Foundation=2C Inc.<br>License GPLv3+: GNU GPL version 3 or later=
<=3B<a href=3D"http://gnu.org/licenses/gpl.html" target=3D"_blank">http:=
//gnu.org/licenses/gpl.html</a>>=3B<br>This is free software: you are fre=
e to change and redistribute it.<br>There is NO WARRANTY=2C to the extent p=
ermitted by law. =3B Type "show copying"<br>and "show warranty" for det=
ails.<br>This GDB was configured as "x86_64-unknown-linux-gnu".<br>For bug =
reporting instructions=2C please see:<br><=3B<a href=3D"http://www.gnu.or=
g/software/gdb/bugs/" target=3D"_blank">http://www.gnu.org/software/gdb/bug=
s/</a>>=3B.<br>(gdb) source ./test.gdb<br>(gdb) foo<br>warning: Invalid c=
ontrol type in canned commands structure.<br>warning: Error executing canne=
d sequence of commands.<br>(gdb) bar<br>Undefined command: "bar". =3B T=
ry "help".<br>(gdb) show user foo<br>User command "foo":<br> =3B wsfoo<=
br> =3B end<br> =3B define bar<br> =3B printf "bar\n"<br>(gdb) =
show user bar<br>Undefined command: "bar". =3B Try "help".<br>(gdb) sho=
w user wsfoo<br>User command "wsfoo":<br> =3B printf "wsfoo\n"<br>(gdb)=
wsfoo<br>wsfoo<br>(gdb)<br><br>Cheers=2C<br>Mohan.<br> =3B<br> =
</div>=0A=
<br>_______________________________________________=0A=
bug-gdb mailing list=0A=
bug-gdb@gnu.org=0A=
https://lists.gnu.org/mailman/listinfo/bug-gdb</div> </div></bod=
y>
</html>=
--_fcb29a69-6cff-40db-ae17-97f4b631c3e5_--
Technical Details
Message-ID:
<mailman.18598.1359543130.855.bug-gdb@gnu.org>Path:
arc1-ca.pugleaf.net!s9ni25767pbb.0!nntp.google.com!news.glorb.com!usenet.stanford.edu!not-for-mailReferences:
<SNT002-W940925C9778E07B6CEE92F8D1E0@phx.gbl>Show Full Headers
Complete Article Headers
X-Google-Thread: f5053,de73d7bed5d0e049
X-Google-NewGroupId: yes
X-Google-Attributes: gidf0ead4270c,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
X-Received: by 10.66.82.103 with SMTP id h7mr559956pay.11.1359543131171;
Wed, 30 Jan 2013 02:52:11 -0800 (PST)
Path: arc1-ca.pugleaf.net!s9ni25767pbb.0!nntp.google.com!news.glorb.com!usenet.stanford.edu!not-for-mail
From: Mohanasundaram Chandran <mohanasundaram.subscribe@outlook.com>
Newsgroups: gnu.gdb.bug
Subject: RE: Problem with user defined commands
Date: Wed, 30 Jan 2013 16:22:02 +0530
Lines: 153
Approved: bug-gdb@gnu.org
Message-ID: <mailman.18598.1359543130.855.bug-gdb@gnu.org>
References: <SNT002-W940925C9778E07B6CEE92F8D1E0@phx.gbl>
NNTP-Posting-Host: lists.gnu.org
Mime-Version: 1.0
X-Trace: usenet.stanford.edu 1359543130 21496 208.118.235.17 (30 Jan 2013 10:52:10 GMT)
X-Complaints-To: action@cs.stanford.edu
To: "bug-gdb@gnu.org" <bug-gdb@gnu.org>
Envelope-to: bug-gdb@gnu.org
X-EIP: [/92FAfm3DvPNmL8mwxj9qZqWq7U97eTp]
X-Originating-Email: [mohanasundaram.subscribe@outlook.com]
Importance: Normal
In-Reply-To: <SNT002-W940925C9778E07B6CEE92F8D1E0@phx.gbl>
X-OriginalArrivalTime: 30 Jan 2013 10:52:02.0569 (UTC)
FILETIME=[D6050790:01CDFED7]
X-detected-operating-system: by eggs.gnu.org: Windows XP
X-Received-From: 65.55.90.225
X-BeenThere: bug-gdb@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gdb>,
<mailto:bug-gdb-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-gdb>
List-Post: <mailto:bug-gdb@gnu.org>
List-Help: <mailto:bug-gdb-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gdb>,
<mailto:bug-gdb-request@gnu.org?subject=subscribe>
Content-Type: multipart/alternative;
boundary="_fcb29a69-6cff-40db-ae17-97f4b631c3e5_"