* [RFA] Fix bug in add_alias_cmd
@ 2009-06-06 15:50 Pierre Muller
2009-06-08 15:37 ` Tom Tromey
2009-06-08 16:26 ` Daniel Jacobowitz
0 siblings, 2 replies; 6+ messages in thread
From: Pierre Muller @ 2009-06-06 15:50 UTC (permalink / raw)
To: gdb-patches
Out of curiosity, I tried to start
gdb with --xdb options to see the special
options that this provides.
I got this:
$ ./gdb -xdb
../../purecvs/gdb/cli/cli-decode.c:255: internal-error: add_alias_cmd:
Assertion
`!aliases && !prehook && prehookee && !posthook && ! posthookee' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]
../../purecvs/gdb/cli/cli-decode.c:255: internal-error: add_alias_cmd:
Assertion
`!aliases && !prehook && prehookee && !posthook && ! posthookee' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]
Aborted (core dumped)
This is due to "bu" being an alias command of "ubreak"
for xdb options, but "ubreak" doesn't seem to exist anywhere
and I found no trace of it anywhere is the sources :(
I fact after looking at the sources, it appears to me
that the assertion itself is wrong.
prehookee should also be NULL, as the other pointers tested.
This small patch fixes it.
Tested on complier farm without regression.
OK to commit?
Pierre Muller
Pascal language support maintainer for GDB
PS: What should we do about
Could I also remove that line
if (xdb_commands)
{
add_com_alias ("ba", "break", class_breakpoint, 1);
add_com_alias ("bu", "ubreak", class_breakpoint, 1);
}
2009-06-06 Pierre Muller <muller@ics.u-strasbg.fr>
* cli/cli-decode.c (add_alias_cmd): Correct assertion.
Index: src/gdb/cli/cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.79
diff -u -p -r1.79 cli-decode.c
--- src/gdb/cli/cli-decode.c 12 May 2009 16:51:13 -0000 1.79
+++ src/gdb/cli/cli-decode.c 6 Jun 2009 11:18:08 -0000
@@ -251,7 +251,7 @@ add_alias_cmd (char *name, char *oldname
&prehook, &prehookee,
&posthook,
&posthookee);
/* If this happens, it means a programmer error somewhere. */
- gdb_assert (!aliases && !prehook && prehookee
+ gdb_assert (!aliases && !prehook && !prehookee
&& !posthook && ! posthookee);
return 0;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA] Fix bug in add_alias_cmd
2009-06-06 15:50 [RFA] Fix bug in add_alias_cmd Pierre Muller
@ 2009-06-08 15:37 ` Tom Tromey
2009-06-08 16:06 ` Pierre Muller
2009-06-08 16:26 ` Daniel Jacobowitz
1 sibling, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2009-06-08 15:37 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
>>>>> "Pierre" == Pierre Muller <muller@ics.u-strasbg.fr> writes:
Pierre> This is due to "bu" being an alias command of "ubreak"
Pierre> for xdb options, but "ubreak" doesn't seem to exist anywhere
Pierre> and I found no trace of it anywhere is the sources :(
Pierre> I fact after looking at the sources, it appears to me
Pierre> that the assertion itself is wrong.
Pierre> prehookee should also be NULL, as the other pointers tested.
Pierre> This small patch fixes it.
Pierre> OK to commit?
Yes, thanks.
IMO, you could have put this patch in under the "obvious" rule.
Pierre> PS: What should we do about
Pierre> Could I also remove that line
Pierre> if (xdb_commands)
Pierre> {
Pierre> add_com_alias ("ba", "break", class_breakpoint, 1);
Pierre> add_com_alias ("bu", "ubreak", class_breakpoint, 1);
Pierre> }
You can just delete the "bu" line.
If you want you could do some archaeology to see whether ubreak ever
existed and, if so, when and why it was removed.
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [RFA] Fix bug in add_alias_cmd
2009-06-08 15:37 ` Tom Tromey
@ 2009-06-08 16:06 ` Pierre Muller
2009-06-08 22:42 ` Tom Tromey
0 siblings, 1 reply; 6+ messages in thread
From: Pierre Muller @ 2009-06-08 16:06 UTC (permalink / raw)
To: tromey; +Cc: gdb-patches
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé : Monday, June 08, 2009 5:37 PM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFA] Fix bug in add_alias_cmd
>
> >>>>> "Pierre" == Pierre Muller <muller@ics.u-strasbg.fr> writes:
>
> Pierre> This is due to "bu" being an alias command of "ubreak"
> Pierre> for xdb options, but "ubreak" doesn't seem to exist anywhere
> Pierre> and I found no trace of it anywhere is the sources :(
>
> Pierre> I fact after looking at the sources, it appears to me
> Pierre> that the assertion itself is wrong.
> Pierre> prehookee should also be NULL, as the other pointers tested.
>
> Pierre> This small patch fixes it.
>
> Pierre> OK to commit?
>
> Yes, thanks.
> IMO, you could have put this patch in under the "obvious" rule.
Thanks, I committed the patch.
> Pierre> PS: What should we do about
> Pierre> Could I also remove that line
> Pierre> if (xdb_commands)
> Pierre> {
> Pierre> add_com_alias ("ba", "break", class_breakpoint, 1);
> Pierre> add_com_alias ("bu", "ubreak", class_breakpoint, 1);
> Pierre> }
>
> You can just delete the "bu" line.
Patch also committed.
> If you want you could do some archaeology to see whether ubreak ever
> existed and, if so, when and why it was removed.
I already did a
grep -R -n -i ubreak *
at src/gdb level, it returned only that
single line, where else could I find something?
Google on 'gdb ubreak' didn't find anything interesting either.
Pierre
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA] Fix bug in add_alias_cmd
2009-06-06 15:50 [RFA] Fix bug in add_alias_cmd Pierre Muller
2009-06-08 15:37 ` Tom Tromey
@ 2009-06-08 16:26 ` Daniel Jacobowitz
2009-06-08 16:59 ` Pedro Alves
1 sibling, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2009-06-08 16:26 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
On Sat, Jun 06, 2009 at 05:49:53PM +0200, Pierre Muller wrote:
>
> Out of curiosity, I tried to start
> gdb with --xdb options to see the special
> options that this provides.
>
> I got this:
> $ ./gdb -xdb
> ../../purecvs/gdb/cli/cli-decode.c:255: internal-error: add_alias_cmd:
> Assertion
> `!aliases && !prehook && prehookee && !posthook && ! posthookee' failed.
Any idea how long this has been broken?
If it's been several releases, it's likely we can remove gdb -xdb.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA] Fix bug in add_alias_cmd
2009-06-08 16:26 ` Daniel Jacobowitz
@ 2009-06-08 16:59 ` Pedro Alves
0 siblings, 0 replies; 6+ messages in thread
From: Pedro Alves @ 2009-06-08 16:59 UTC (permalink / raw)
To: gdb-patches; +Cc: Daniel Jacobowitz, Pierre Muller
On Monday 08 June 2009 17:26:09, Daniel Jacobowitz wrote:
> Any idea how long this has been broken?
>
> If it's been several releases, it's likely we can remove gdb -xdb.
I thought the same. But, this is post-6.8 breakage.
I also wondered if "ubreak" was a typo for something else,
like "tbreak". Does anyone actually know what "ub" was
supposed to do in xdb? Maybe "unbreak" -- remove
breakpoint? Just curiosity, I've never used xdb, or
known someone that actually used the -xdb mode in gdb.
--
Pedro Alves
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA] Fix bug in add_alias_cmd
2009-06-08 16:06 ` Pierre Muller
@ 2009-06-08 22:42 ` Tom Tromey
0 siblings, 0 replies; 6+ messages in thread
From: Tom Tromey @ 2009-06-08 22:42 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
>>>>> "Pierre" == Pierre Muller <muller@ics.u-strasbg.fr> writes:
Pierre> I already did a
Pierre> grep -R -n -i ubreak *
Pierre> at src/gdb level, it returned only that
Pierre> single line, where else could I find something?
Pierre> Google on 'gdb ubreak' didn't find anything interesting either.
You could try looking to see when the alias was added. I also look at
the ChangeLogs for things like this, but I didn't see any mention of
"ubreak".
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-06-08 22:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-06 15:50 [RFA] Fix bug in add_alias_cmd Pierre Muller
2009-06-08 15:37 ` Tom Tromey
2009-06-08 16:06 ` Pierre Muller
2009-06-08 22:42 ` Tom Tromey
2009-06-08 16:26 ` Daniel Jacobowitz
2009-06-08 16:59 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox