* [RFA] ARI fix: Remove asprintf in breakpoint.c
@ 2007-10-08 12:21 Pierre Muller
2007-10-08 13:42 ` Joel Brobecker
0 siblings, 1 reply; 11+ messages in thread
From: Pierre Muller @ 2007-10-08 12:21 UTC (permalink / raw)
To: gdb-patches
Trying to reduce the number of critical
errors in
http://sourceware.org/gdb/current/ari/
Is this one OK to commit?
Pierre Muller
ChangeLog entry:
2007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
* breakpoint.c (print_one_breakpoint_location): ARI fix:
Replace asprintf by xstrprintf.
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.271
diff -u -p -r1.271 breakpoint.c
--- breakpoint.c 1 Oct 2007 00:17:57 -0000 1.271
+++ breakpoint.c 8 Oct 2007 12:11:31 -0000
@@ -3526,7 +3526,7 @@ print_one_breakpoint_location (struct br
if (part_of_multiple)
{
char *formatted;
- asprintf (&formatted, "%d.%d", b->number, loc_number);
+ formatted = xstrprintf ("%d.%d", b->number, loc_number);
ui_out_field_string (uiout, "number", formatted);
xfree (formatted);
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] ARI fix: Remove asprintf in breakpoint.c
2007-10-08 12:21 [RFA] ARI fix: Remove asprintf in breakpoint.c Pierre Muller
@ 2007-10-08 13:42 ` Joel Brobecker
2007-10-08 13:51 ` Pierre Muller
0 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2007-10-08 13:42 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
> 2007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * breakpoint.c (print_one_breakpoint_location): ARI fix:
> Replace asprintf by xstrprintf.
Yes, this one looks fine. Did you run the testsuite?
--
Joel
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [RFA] ARI fix: Remove asprintf in breakpoint.c
2007-10-08 13:42 ` Joel Brobecker
@ 2007-10-08 13:51 ` Pierre Muller
2007-10-08 15:02 ` Joel Brobecker
2007-10-08 19:38 ` Pedro Alves
0 siblings, 2 replies; 11+ messages in thread
From: Pierre Muller @ 2007-10-08 13:51 UTC (permalink / raw)
To: 'Joel Brobecker'; +Cc: gdb-patches
No, sorry, but the testsuite on cygwin is really a pain,
it has some signal problems that makes the testsuite
horribly slow, with tons of timeouts...
and no I have no easy linux access.
Pierre
> -----Original Message-----
> From: Joel Brobecker [mailto:brobecker@adacore.com]
> Sent: Monday, October 08, 2007 3:42 PM
> To: Pierre Muller
> Cc: gdb-patches@sourceware.org
> Subject: Re: [RFA] ARI fix: Remove asprintf in breakpoint.c
>
> > 2007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
> >
> > * breakpoint.c (print_one_breakpoint_location): ARI fix:
> > Replace asprintf by xstrprintf.
>
> Yes, this one looks fine. Did you run the testsuite?
>
> --
> Joel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] ARI fix: Remove asprintf in breakpoint.c
2007-10-08 13:51 ` Pierre Muller
@ 2007-10-08 15:02 ` Joel Brobecker
2007-10-08 15:24 ` Pierre Muller
2007-10-08 19:38 ` Pedro Alves
1 sibling, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2007-10-08 15:02 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
> No, sorry, but the testsuite on cygwin is really a pain,
> it has some signal problems that makes the testsuite
> horribly slow, with tons of timeouts...
> and no I have no easy linux access.
Humpf, I know the pain of horribly slow testsuites. I also test
on some machines where I need to wait overnight before getting
the results.
We could probably do without a testsuite run in this case, but you
never know. If you have the opportunity to do so, perhaps you can
batch all your patches, test them overnight, and then submit them
the next day. If this is too much hassle, I'd much rather have you
contribute and I'll help with the testing.
> > > 2007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
> > >
> > > * breakpoint.c (print_one_breakpoint_location): ARI fix:
> > > Replace asprintf by xstrprintf.
I tested this one for you, so you can go ahead and check it in.
Thank you|
--
Joel
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [RFA] ARI fix: Remove asprintf in breakpoint.c
2007-10-08 15:02 ` Joel Brobecker
@ 2007-10-08 15:24 ` Pierre Muller
2007-10-08 16:09 ` Daniel Jacobowitz
0 siblings, 1 reply; 11+ messages in thread
From: Pierre Muller @ 2007-10-08 15:24 UTC (permalink / raw)
To: 'Joel Brobecker'; +Cc: gdb-patches
Thanks for the approval,
committed.
Concerning the overnight running of testsuites
with different patches, does anyone have some
script that automates this?
Pierre
> -----Original Message-----
> From: Joel Brobecker [mailto:brobecker@adacore.com]
> Sent: Monday, October 08, 2007 5:02 PM
> To: Pierre Muller
> Cc: gdb-patches@sourceware.org
> Subject: Re: [RFA] ARI fix: Remove asprintf in breakpoint.c
>
> > No, sorry, but the testsuite on cygwin is really a pain,
> > it has some signal problems that makes the testsuite
> > horribly slow, with tons of timeouts...
> > and no I have no easy linux access.
>
> Humpf, I know the pain of horribly slow testsuites. I also test
> on some machines where I need to wait overnight before getting
> the results.
>
> We could probably do without a testsuite run in this case, but you
> never know. If you have the opportunity to do so, perhaps you can
> batch all your patches, test them overnight, and then submit them
> the next day. If this is too much hassle, I'd much rather have you
> contribute and I'll help with the testing.
>
> > > > 2007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
> > > >
> > > > * breakpoint.c (print_one_breakpoint_location): ARI fix:
> > > > Replace asprintf by xstrprintf.
>
> I tested this one for you, so you can go ahead and check it in.
> Thank you|
>
> --
> Joel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] ARI fix: Remove asprintf in breakpoint.c
2007-10-08 15:24 ` Pierre Muller
@ 2007-10-08 16:09 ` Daniel Jacobowitz
2007-10-08 16:25 ` Joel Brobecker
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2007-10-08 16:09 UTC (permalink / raw)
To: Pierre Muller; +Cc: 'Joel Brobecker', gdb-patches
On Mon, Oct 08, 2007 at 05:24:16PM +0200, Pierre Muller wrote:
> Thanks for the approval,
> committed.
>
> Concerning the overnight running of testsuites
> with different patches, does anyone have some
> script that automates this?
No - but it's reasonable to test them together in a single test run,
I think.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] ARI fix: Remove asprintf in breakpoint.c
2007-10-08 16:09 ` Daniel Jacobowitz
@ 2007-10-08 16:25 ` Joel Brobecker
2007-10-08 17:18 ` Daniel Jacobowitz
0 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2007-10-08 16:25 UTC (permalink / raw)
To: Pierre Muller, gdb-patches
> > Concerning the overnight running of testsuites
> > with different patches, does anyone have some
> > script that automates this?
>
> No - but it's reasonable to test them together in a single test run,
> I think.
That's indeed what I meant. However, I can see the need for a script
if you have to do two runs (one before patching, and one after).
I have a set of scripts that I can send, but they are deeply
dependent on my entire environment (including the interactive shell
sessions). My scripts are pretty complex because I re-use them in
many different contexts on 3 different sites (in Paris, in New York,
and at my home). Unless someone else can share a script, I think it'll
be simpler for you to write a script of your own.
The essence of my script is:
- Take patch name from argument lists.
Verify that patch exists before continuing. Nothing worse than having
a failure 12hours later because you mistyped your patch name :)
- mkdir test-dir
- cd test-dir
- cp -R gdb-sources .
- cd gdb-sources
- configure
- make
- cd gdb/testsuite
- make check
- cp gdb.sum gdb.sum.ref
- cp gdb.log gdb.log.ref
- cd ..
- patch -p0 < your-patch
- make
- cd testsuite
- make check
(with various checks against $? at the end of steps such as the
GDB build, so that you don't continue if something failed).
As I said, if the stream of your patches is relatively small,
I don't mind doing the testing for you, since it's pretty automated
on my side. But if you are going to contribute a regular amount
of patches, it makes sense to invest the time in them.
--
Joel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] ARI fix: Remove asprintf in breakpoint.c
2007-10-08 16:25 ` Joel Brobecker
@ 2007-10-08 17:18 ` Daniel Jacobowitz
0 siblings, 0 replies; 11+ messages in thread
From: Daniel Jacobowitz @ 2007-10-08 17:18 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Pierre Muller, gdb-patches
On Mon, Oct 08, 2007 at 09:24:56AM -0700, Joel Brobecker wrote:
> As I said, if the stream of your patches is relatively small,
> I don't mind doing the testing for you, since it's pretty automated
> on my side. But if you are going to contribute a regular amount
> of patches, it makes sense to invest the time in them.
I've run the testsuite on Cygwin in the last couple of months and
had no trouble. Pierre, how long does it take for you? I'll rerun
and compare. I don't think it was more than an hour or two.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] ARI fix: Remove asprintf in breakpoint.c
2007-10-08 13:51 ` Pierre Muller
2007-10-08 15:02 ` Joel Brobecker
@ 2007-10-08 19:38 ` Pedro Alves
2007-10-09 14:46 ` Pierre Muller
1 sibling, 1 reply; 11+ messages in thread
From: Pedro Alves @ 2007-10-08 19:38 UTC (permalink / raw)
To: Pierre Muller; +Cc: 'Joel Brobecker', gdb-patches
Pierre Muller wrote:
> No, sorry, but the testsuite on cygwin is really a pain,
> it has some signal problems that makes the testsuite
> horribly slow, with tons of timeouts...
> and no I have no easy linux access.
>
I know what you mean ...
I use these patches to be able to test on Cygwin less painfully:
[PATCH] i386_skip_prologue
http://sources.redhat.com/ml/gdb-patches/2006-12/msg00140.html
[[PATCH] Line info in the presence of __main, and NOTE_INSN_FUNCTION_BEG after
scheduling:]
http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00633.html
The gcc patch is really outdated, and doesn't apply to
current gcc svn, so I still have a gcc build from 20061123
to test gdb. Far from ideal, but otherwise, many testcases timeout
and go untested.
I keep wanting to fix this correctly, but I never get around to it.
From the last discussion on the subject, the idea was to teach the
i386 (and any other arch that cares) prologue reader about
__main as a first step. I don't think that's hard.
Cheers,
Pedro Alves
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [RFA] ARI fix: Remove asprintf in breakpoint.c
2007-10-08 19:38 ` Pedro Alves
@ 2007-10-09 14:46 ` Pierre Muller
2007-10-09 16:08 ` Pierre Muller
0 siblings, 1 reply; 11+ messages in thread
From: Pierre Muller @ 2007-10-09 14:46 UTC (permalink / raw)
To: 'Pedro Alves'; +Cc: 'Joel Brobecker', gdb-patches
The main problem was
gdb.base/sigstep.exp
that took about 2 hours and 20 min to complete alone :(
The main reason is that this is just a huge list of timeouts
related to the fact that cygin only accepts
ITIMER_REAL as first arg of setitimer.
I will send a patch to fix this, by checking the return
value of setitimer.
Pierre
> -----Original Message-----
> From: Pedro Alves [mailto:alves.ped@gmail.com] On Behalf Of Pedro Alves
> Sent: Monday, October 08, 2007 9:34 PM
> To: Pierre Muller
> Cc: 'Joel Brobecker'; gdb-patches@sourceware.org
> Subject: Re: [RFA] ARI fix: Remove asprintf in breakpoint.c
>
> Pierre Muller wrote:
> > No, sorry, but the testsuite on cygwin is really a pain,
> > it has some signal problems that makes the testsuite
> > horribly slow, with tons of timeouts...
> > and no I have no easy linux access.
> >
>
> I know what you mean ...
>
> I use these patches to be able to test on Cygwin less painfully:
>
> [PATCH] i386_skip_prologue
> http://sources.redhat.com/ml/gdb-patches/2006-12/msg00140.html
>
> [[PATCH] Line info in the presence of __main, and
> NOTE_INSN_FUNCTION_BEG after
> scheduling:]
> http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00633.html
>
> The gcc patch is really outdated, and doesn't apply to
> current gcc svn, so I still have a gcc build from 20061123
> to test gdb. Far from ideal, but otherwise, many testcases timeout
> and go untested.
>
> I keep wanting to fix this correctly, but I never get around to it.
> From the last discussion on the subject, the idea was to teach the
> i386 (and any other arch that cares) prologue reader about
> __main as a first step. I don't think that's hard.
>
> Cheers,
> Pedro Alves
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [RFA] ARI fix: Remove asprintf in breakpoint.c
2007-10-09 14:46 ` Pierre Muller
@ 2007-10-09 16:08 ` Pierre Muller
0 siblings, 0 replies; 11+ messages in thread
From: Pierre Muller @ 2007-10-09 16:08 UTC (permalink / raw)
To: 'Pedro Alves'; +Cc: 'Joel Brobecker', gdb-patches
With my change in gdb.base/sigstep.c
(and similar changes in gdb.base/sigXXX.c files)
and my change of gdb.exp to avoid interruption in
gdb.fortran/array-element.exp
I was able to complete a Cygwin testsuite in 45 minutes.
A lot better than previously.
I did not use Pedro's patch to fix the
i386_skip_prologue, thus the number of failures
are still huge.
Results are:
=== gdb Summary ===
# of expected passes 10186
# of unexpected failures 509
# of expected failures 59
# of known failures 30
# of unresolved testcases 38
# of untested testcases 8
# of unsupported tests 16
/usr/local/src/cvs/build/gdb/testsuite/../../gdb/gdb version
6.7.50-20071009-cvs -nx
gdb.pascal directory gives me just
a XFAIL for "Breakpoint 2" due to gpc problems with line information
and a KFAIL for "ptyp 'a single string'"
Thus I should be able to test my patches locally now...
Pierre Muller
Pasca language maintainer.
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Pierre Muller
> Sent: Tuesday, October 09, 2007 4:40 PM
> To: 'Pedro Alves'
> Cc: 'Joel Brobecker'; gdb-patches@sourceware.org
> Subject: RE: [RFA] ARI fix: Remove asprintf in breakpoint.c
>
> The main problem was
> gdb.base/sigstep.exp
> that took about 2 hours and 20 min to complete alone :(
> The main reason is that this is just a huge list of timeouts
> related to the fact that cygin only accepts
> ITIMER_REAL as first arg of setitimer.
> I will send a patch to fix this, by checking the return
> value of setitimer.
>
> Pierre
>
> > -----Original Message-----
> > From: Pedro Alves [mailto:alves.ped@gmail.com] On Behalf Of Pedro
> Alves
> > Sent: Monday, October 08, 2007 9:34 PM
> > To: Pierre Muller
> > Cc: 'Joel Brobecker'; gdb-patches@sourceware.org
> > Subject: Re: [RFA] ARI fix: Remove asprintf in breakpoint.c
> >
> > Pierre Muller wrote:
> > > No, sorry, but the testsuite on cygwin is really a pain,
> > > it has some signal problems that makes the testsuite
> > > horribly slow, with tons of timeouts...
> > > and no I have no easy linux access.
> > >
> >
> > I know what you mean ...
> >
> > I use these patches to be able to test on Cygwin less painfully:
> >
> > [PATCH] i386_skip_prologue
> > http://sources.redhat.com/ml/gdb-patches/2006-12/msg00140.html
> >
> > [[PATCH] Line info in the presence of __main, and
> > NOTE_INSN_FUNCTION_BEG after
> > scheduling:]
> > http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00633.html
> >
> > The gcc patch is really outdated, and doesn't apply to
> > current gcc svn, so I still have a gcc build from 20061123
> > to test gdb. Far from ideal, but otherwise, many testcases timeout
> > and go untested.
> >
> > I keep wanting to fix this correctly, but I never get around to it.
> > From the last discussion on the subject, the idea was to teach the
> > i386 (and any other arch that cares) prologue reader about
> > __main as a first step. I don't think that's hard.
> >
> > Cheers,
> > Pedro Alves
> >
> >
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-10-09 15:49 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-08 12:21 [RFA] ARI fix: Remove asprintf in breakpoint.c Pierre Muller
2007-10-08 13:42 ` Joel Brobecker
2007-10-08 13:51 ` Pierre Muller
2007-10-08 15:02 ` Joel Brobecker
2007-10-08 15:24 ` Pierre Muller
2007-10-08 16:09 ` Daniel Jacobowitz
2007-10-08 16:25 ` Joel Brobecker
2007-10-08 17:18 ` Daniel Jacobowitz
2007-10-08 19:38 ` Pedro Alves
2007-10-09 14:46 ` Pierre Muller
2007-10-09 16:08 ` Pierre Muller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox