Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Nicolas Blanc <nicolas.blanc@intel.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] Test adding and removing a symbol file at runtime.
Date: Wed, 24 Apr 2013 12:18:00 -0000	[thread overview]
Message-ID: <871ua1ouzr.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1366098721-18302-4-git-send-email-nicolas.blanc@intel.com>	(Nicolas Blanc's message of "Tue, 16 Apr 2013 09:52:00 +0200")

>>>>> "Nicolas" == Nicolas Blanc <nicolas.blanc@intel.com> writes:

Nicolas> This test exercises the commands 'add-symbol-file'
Nicolas> and 'remove-symbol-file'.

Thank you.

Nicolas> +#include </usr/include/elf.h>

This line seems wrong.

It seems simpler to do the test by using an ordinary .so and then
calling remove-symbol-file on it.  Then perhaps it could even work on
some non-ELF systems.  Would this not work for some reason?

Nicolas> +# 6)  Set a breakpiont at FOO in $librc.

Two typos, "breakpoint" and "$libsrc".

Nicolas> +set testfile sym-file-main
Nicolas> +set libfile sym-file-lib
Nicolas> +set srcfile ${testfile}.c
Nicolas> +set binfile ${objdir}/${subdir}/${testfile}
Nicolas> +
Nicolas> +set libsrc "${srcdir}/${subdir}/${libfile}.c"
Nicolas> +set libname "${libfile}.so"
Nicolas> +set shlib_name "${objdir}/${subdir}/${libname}"
Nicolas> +set libobj "${objdir}/${subdir}/${libname}"
Nicolas> +set execsrc "${srcdir}/${subdir}/${srcfile}"

This should use standard_testfile and standard_output_file.

Nicolas> +gdb_exit
Nicolas> +gdb_start
Nicolas> +gdb_reinitialize_dir $srcdir/$subdir
Nicolas> +
Nicolas> +# 1) Load the main executable.
Nicolas> +set result [gdb_load ${binfile}]
Nicolas> +if { $result != 0 } then {
Nicolas> +   return
Nicolas> +}

clean_restart

Nicolas> +# 6) Set a breakpoint at FOO in $libsrc.
Nicolas> +set result [gdb_breakpoint foo]
Nicolas> +if { !$result } then {
Nicolas> +    return

I think most .exp files don't bother checking each result like this.
It is enough for one thing to report a fail; the test may limp on.

That said I don't really mind either way.

Tom


  reply	other threads:[~2013-04-23 20:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 11:22 [PATCH 0/3] remove-symbol-file Nicolas Blanc
2013-04-16 11:51 ` [PATCH 2/3] Test adding and removing a symbol file at runtime Nicolas Blanc
2013-04-24 12:18   ` Tom Tromey [this message]
2013-04-24 12:18     ` Tom Tromey
2013-04-16 12:18 ` [PATCH 1/3] Command remove-symbol-file Nicolas Blanc
2013-04-16 13:25 ` [PATCH 1/3] Added command remove-symbol-file Nicolas Blanc
2013-04-22 13:32   ` Yao Qi
2013-04-24 18:54   ` Tom Tromey
2013-04-25 19:24     ` Blanc, Nicolas
2013-04-25 20:07       ` Tom Tromey
2013-04-26 14:13       ` Yao Qi
2013-04-26 20:23   ` Pedro Alves
2013-04-30  7:30     ` Blanc, Nicolas
2013-04-30  9:28       ` Pedro Alves
2013-04-30 16:53         ` Blanc, Nicolas
2013-05-08 17:56           ` Pedro Alves
2013-05-28 11:25             ` Blanc, Nicolas
2013-04-16 14:18 ` [PATCH 3/3] Documentation for the remove-symbol-file command Nicolas Blanc
2013-04-16 15:12   ` Eli Zaretskii
2013-04-24  9:22 ` [PATCH 0/3] remove-symbol-file Tom Tromey
2013-04-24 20:40   ` Blanc, Nicolas
2013-04-24 20:49     ` Pedro Alves
2013-04-25 17:25       ` Blanc, Nicolas
2013-04-26 19:13         ` Pedro Alves
2013-04-24 17:46 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871ua1ouzr.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nicolas.blanc@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox