Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFC: call bfd_init
@ 2013-01-11 15:18 Tom Tromey
  2013-01-11 15:34 ` Joel Brobecker
  2013-01-21 17:39 ` Tom Tromey
  0 siblings, 2 replies; 6+ messages in thread
From: Tom Tromey @ 2013-01-11 15:18 UTC (permalink / raw)
  To: gdb-patches

Technically, a user of BFD is supposed to call bfd_init before calling
any other functions from the library.

bfd_init is a no-op, so right now nothing notices.  But, I figured it
would be safe to add the call in case this ever changes.

Tom

2013-01-11  Tom Tromey  <tromey@redhat.com>

	* main.c (captured_main): Call bfd_init.

diff --git a/gdb/main.c b/gdb/main.c
index c9439bb..6ed014f 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -357,6 +357,8 @@ captured_main (void *data)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
+  bfd_init ();
+
   make_cleanup (VEC_cleanup (cmdarg_s), &cmdarg_vec);
   dirsize = 1;
   dirarg = (char **) xmalloc (dirsize * sizeof (*dirarg));


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

* Re: RFC: call bfd_init
  2013-01-11 15:18 RFC: call bfd_init Tom Tromey
@ 2013-01-11 15:34 ` Joel Brobecker
  2013-01-21 17:39 ` Tom Tromey
  1 sibling, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2013-01-11 15:34 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

> 2013-01-11  Tom Tromey  <tromey@redhat.com>
> 
> 	* main.c (captured_main): Call bfd_init.

FWIW: I think it is a good idea.

-- 
Joel


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

* Re: RFC: call bfd_init
  2013-01-11 15:18 RFC: call bfd_init Tom Tromey
  2013-01-11 15:34 ` Joel Brobecker
@ 2013-01-21 17:39 ` Tom Tromey
  2013-01-21 20:40   ` Testsuite regression for gdb.gdb/selftest.exp [Re: RFC: call bfd_init] Jan Kratochvil
  1 sibling, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2013-01-21 17:39 UTC (permalink / raw)
  To: gdb-patches

>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> Technically, a user of BFD is supposed to call bfd_init before calling
Tom> any other functions from the library.

Tom> bfd_init is a no-op, so right now nothing notices.  But, I figured it
Tom> would be safe to add the call in case this ever changes.

I'm checking this in now.

Tom


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

* Testsuite regression for gdb.gdb/selftest.exp  [Re: RFC: call bfd_init]
  2013-01-21 17:39 ` Tom Tromey
@ 2013-01-21 20:40   ` Jan Kratochvil
  2013-01-21 20:45     ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kratochvil @ 2013-01-21 20:40 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On Mon, 21 Jan 2013 18:30:37 +0100, Tom Tromey wrote:
> >>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
> Tom> bfd_init is a no-op, so right now nothing notices.  But, I figured it
> Tom> would be safe to add the call in case this ever changes.
> 
> I'm checking this in now.

dbd454a9c7690a87c57d5b8a28a02388665c1f46 is the first bad commit
commit dbd454a9c7690a87c57d5b8a28a02388665c1f46
Author: Tom Tromey <tromey@redhat.com>
Date:   Mon Jan 21 17:32:09 2013 +0000

    	* main.c (captured_main): Call bfd_init.

 Running gdb/testsuite/gdb.gdb/selftest.exp ...
[...]
 PASS: gdb.gdb/selftest.exp: next over textdomain PACKAGE
-PASS: gdb.gdb/selftest.exp: next over cmdarg_s VEC_cleanup
-PASS: gdb.gdb/selftest.exp: next over dirsize initialization
+FAIL: gdb.gdb/selftest.exp: unknown source line after next over textdomain PACKAGE
 PASS: gdb.gdb/selftest.exp: print a string
-PASS: gdb.gdb/selftest.exp: step into xmalloc call
+FAIL: gdb.gdb/selftest.exp: step into xmalloc call
 PASS: gdb.gdb/selftest.exp: xgdb is at prompt
 PASS: gdb.gdb/selftest.exp: Set xgdb prompt
 PASS: gdb.gdb/selftest.exp: send ^C to child process


Regards,
Jan


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

* Re: Testsuite regression for gdb.gdb/selftest.exp  [Re: RFC: call bfd_init]
  2013-01-21 20:40   ` Testsuite regression for gdb.gdb/selftest.exp [Re: RFC: call bfd_init] Jan Kratochvil
@ 2013-01-21 20:45     ` Tom Tromey
  2013-01-22 15:47       ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2013-01-21 20:45 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> -PASS: gdb.gdb/selftest.exp: next over dirsize initialization
Jan> +FAIL: gdb.gdb/selftest.exp: unknown source line after next over textdomain PACKAGE

Haha, of course.
I will fix it tomorrow.

selftest.exp fails randomly for me so it is in my list to ignore.
I guess I will try to diagnose this as well.

Tom


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

* Re: Testsuite regression for gdb.gdb/selftest.exp  [Re: RFC: call bfd_init]
  2013-01-21 20:45     ` Tom Tromey
@ 2013-01-22 15:47       ` Tom Tromey
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Tromey @ 2013-01-22 15:47 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

Tom> Haha, of course.
Tom> I will fix it tomorrow.

Here is what I am checking in.

Tom> selftest.exp fails randomly for me so it is in my list to ignore.
Tom> I guess I will try to diagnose this as well.

It is due to differences in the builds.  A comment in selftest.exp warns
about this, but the test names still depend on the details of the build.
Gross.  Anyway I will stop ignoring it now.

Tom

2013-01-22  Tom Tromey  <tromey@redhat.com>

	* gdb.gdb/selftest.exp (do_steps_and_nexts): Handle bfd_init
	call.

Index: gdb.gdb/selftest.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.gdb/selftest.exp,v
retrieving revision 1.32
diff -u -r1.32 selftest.exp
--- gdb.gdb/selftest.exp	1 Jan 2013 06:41:22 -0000	1.32
+++ gdb.gdb/selftest.exp	22 Jan 2013 15:46:10 -0000
@@ -150,6 +150,10 @@
 		set description "next over textdomain PACKAGE"
 		set command "next"
 	    }
+	    -re ".*bfd_init ..;.*$gdb_prompt $" {
+		set description "next over bfd_init"
+		set command "next"
+	    }
 	    -re ".*VEC_cleanup .cmdarg_s.*$gdb_prompt $" {
 		set description "next over cmdarg_s VEC_cleanup"
 		set command "next"


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

end of thread, other threads:[~2013-01-22 15:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-11 15:18 RFC: call bfd_init Tom Tromey
2013-01-11 15:34 ` Joel Brobecker
2013-01-21 17:39 ` Tom Tromey
2013-01-21 20:40   ` Testsuite regression for gdb.gdb/selftest.exp [Re: RFC: call bfd_init] Jan Kratochvil
2013-01-21 20:45     ` Tom Tromey
2013-01-22 15:47       ` Tom Tromey

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