Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [3/3] RFC: fix PR mi/8444
Date: Tue, 22 Nov 2011 14:55:00 -0000	[thread overview]
Message-ID: <201111221455.05151.pedro@codesourcery.com> (raw)
In-Reply-To: <m3ipmig0ra.fsf@fleche.redhat.com>

On Thursday 17 November 2011 16:41:13, Tom Tromey wrote:
> >>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
> 
> Pedro> TARGET_WAITKIND_LOADED targets print this elsewhere, as
> Pedro> they don't use a shared library event breakpoint.  See
> Pedro> infrun.c:normal_stop.  Can you give that the same treatment?
> 
> What do you think of the appended?
> 
> I don't think I have access to a TARGET_WAITKIND_LOADED target, so I
> can't test this.
> 
> I added a 'kind' argument to bpstat_print, to centralize the printing.
> I wasn't sure if this is a good idea or not; I think the centralization
> idea is fine, but I wasn't sure if this addition is violating some
> abstraction boundary.

Yeah, looks fine.  This should probably be a catchpoint anyway.

> --- /dev/null
> +++ b/gdb/testsuite/gdb.mi/mi-solib.exp
> @@ -0,0 +1,55 @@

> +load_lib mi-support.exp
> +set MIFLAGS "-i=mi2"

The test uses shared libs -- it should be skipped if skip_shlib_tests.

> +
> +gdb_exit
> +if [mi_gdb_start] {
> +    continue
> +}
> +
> +set libname "solib-lib"
> +set srcfile_lib ${srcdir}/${subdir}/${libname}.c
> +set binfile_lib ${objdir}/${subdir}/${libname}.so
> +set lib_flags [list debug ldflags=-Wl,-Bsymbolic]

Is -Bsymbolic necessary?

> +
> +set testfile "solib-main"
> +set srcfile ${srcdir}/${subdir}/${testfile}.c
> +set binfile ${objdir}/${subdir}/${testfile}
> +set bin_flags [list debug shlib=${binfile_lib}]
> +
> +if [get_compiler_info ${binfile}] {
> +    return -1
> +}
> +
> +if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
> +     || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
> +  untested "Could not compile $binfile_lib or $binfile."
> +  return -1
> +}
> +
> +mi_delete_breakpoints
> +mi_gdb_reinitialize_dir $srcdir/$subdir
> +mi_gdb_reinitialize_dir $srcdir/$subdir
> +mi_gdb_load ${binfile}

gdb_load_shlibs missing.

> --- /dev/null
> +++ b/gdb/testsuite/gdb.mi/solib-lib.c

> +#include <stdio.h>

Unnecessary header.

> --- /dev/null
> +++ b/gdb/testsuite/gdb.mi/solib-main.c

> +*/
> +#include <stdio.h>

Ditto.

>  
> +proc mi_run_cmd {args} {
> +    return [eval mi_run_cmd_full 1 $args]
> +}
> +
> +proc mi_run_with_cli {args} {
> +    return [eval mi_run_cmd_full 0 $args]
> +}

Describing comments would be nice.

Otherwise looks good to me.

-- 
Pedro Alves


  reply	other threads:[~2011-11-22 14:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 20:28 Tom Tromey
2011-11-16 21:31 ` Pedro Alves
2011-11-17 16:41   ` Tom Tromey
2011-11-22 14:55     ` Pedro Alves [this message]
2011-11-22 21:22       ` Tom Tromey
2011-11-25 16:08         ` Ulrich Weigand
2011-12-02  1:18           ` [patch] testsuite: Fix mi-solib.exp without debuginfos [Re: [3/3] RFC: fix PR mi/8444] Jan Kratochvil
2011-12-02 16:17             ` Tom Tromey
2011-12-02 22:36               ` [commit] " Jan Kratochvil
2011-12-09 21:26             ` Tom Tromey
2011-12-09 21:54               ` Jan Kratochvil
2011-12-09 21:56                 ` Tom Tromey
2011-11-17  4:03 ` [3/3] RFC: fix PR mi/8444 Eli Zaretskii

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=201111221455.05151.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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