public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simon.marchi@efficios.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] gdb: make "start" breakpoint inferior-specific
Date: Fri, 11 Nov 2022 13:37:32 +0100	[thread overview]
Message-ID: <1c02e882-c19e-483e-e50c-634fbe282988@suse.de> (raw)
In-Reply-To: <20221108212008.1792090-1-simon.marchi@efficios.com>

On 11/8/22 22:20, Simon Marchi via Gdb-patches wrote:
> -      std::string arg = string_printf ("-qualified %s", main_name ());
> +      std::string arg = string_printf ("-qualified %s if $_inferior == %d", main_name (),
> +				       current_inferior ()->num);

Hi,

it seems ada doesn't like the syntax, we get:
...
(gdb) start ^M
Error in expression, near `1'.^M
(gdb) UNTESTED: gdb.ada/start.exp: start failed to land inside the right 
procedure
...

Thanks,
- Tom

(gdb) bt
#0  0x00007ffff4c3dad2 in __cxxabiv1::__cxa_throw (obj=0x2d8cef0,
     tinfo=0x1471210 <typeinfo for gdb_exception_error>,
     dest=0xb70b06 <gdb_exception_error::~gdb_exception_error()>)
     at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:78
#1  0x000000000141eb12 in throw_it(return_reason, errors, const char *, 
typedef __va_list_tag __va_list_tag *) (reason=RETURN_ERROR, 
error=GENERIC_ERROR,
     fmt=0x14789a8 "Error in expression, near `%s'.", ap=0x7fffffffb258)
     at 
/home/vries/gdb_versions/devel/src/gdbsupport/common-exceptions.cc:200
#2  0x000000000141eb8e in throw_verror (error=GENERIC_ERROR,
     fmt=0x14789a8 "Error in expression, near `%s'.", ap=0x7fffffffb258)
     at 
/home/vries/gdb_versions/devel/src/gdbsupport/common-exceptions.cc:208
#3  0x0000000000cce1d2 in verror (string=0x14789a8 "Error in expression, 
near `%s'.",
     args=0x7fffffffb258) at 
/home/vries/gdb_versions/devel/src/gdb/utils.c:164
#4  0x0000000001423811 in error (fmt=0x14789a8 "Error in expression, 
near `%s'.")
     at /home/vries/gdb_versions/devel/src/gdbsupport/errors.cc:46
#5  0x000000000043b90d in ada_yyerror (msg=0x147623a "syntax error")
     at /home/vries/gdb_versions/devel/src/gdb/ada-exp.y:1169
#6  0x000000000043793f in ada_yyparse () at ada-exp.c.tmp:2905
#7  0x000000000043b818 in ada_parse (par_state=0x7fffffffcca0)
     at /home/vries/gdb_versions/devel/src/gdb/ada-exp.y:1155
#8  0x000000000047b418 in ada_language::parser (this=0x29937d0 
<ada_language_defn>,
     ps=0x7fffffffcca0) at 
/home/vries/gdb_versions/devel/src/gdb/ada-lang.c:13855
#9  0x00000000009bdcd2 in parse_exp_in_context 
(stringptr=0x7fffffffce08, pc=4202360,
     block=0x37c2280, comma=0, void_context_p=false, 
tracker=0x7fffffffcd20, completer=0x0)
     at /home/vries/gdb_versions/devel/src/gdb/parse.c:515
#10 0x00000000009bda5f in parse_exp_1 (stringptr=0x7fffffffce08, 
pc=4202360,
     block=0x37c2280, comma=0, tracker=0x0)
     at /home/vries/gdb_versions/devel/src/gdb/parse.c:428
#11 0x0000000000567921 in find_condition_and_thread (tok=0x376f439 
"$_inferior == 1",
     pc=4202360, cond_string=0x7fffffffcec8, thread=0x7fffffffcec4, 
task=0x7fffffffcec0,
     rest=0x7fffffffceb8) at 
/home/vries/gdb_versions/devel/src/gdb/breakpoint.c:8649
#12 0x0000000000567c78 in find_condition_and_thread_for_sals (
     sals=std::vector of length 1, capacity 1 = {...}, input=0x376f436 
"if $_inferior == 1",
     cond_string=0x7fffffffcf78, thread=0x7fffffffcf34, 
task=0x7fffffffcfbc,
     rest=0x7fffffffcf80) at 
/home/vries/gdb_versions/devel/src/gdb/breakpoint.c:8728
#13 0x0000000000568389 in create_breakpoint (gdbarch=0x2d8d1e0, 
locspec=0x376f500,
     cond_string=0x0, thread=0, extra_string=0x376f436 "if $_inferior == 
1",
     force_condition=false, parse_extra=1, tempflag=1, 
type_wanted=bp_breakpoint,
     ignore_count=0, pending_break_support=AUTO_BOOLEAN_AUTO,
     ops=0x14afec0 <code_breakpoint_ops>, from_tty=0, enabled=1, 
internal=0, flags=0)
     at /home/vries/gdb_versions/devel/src/gdb/breakpoint.c:8909
#14 0x0000000000568be2 in break_command_1 (arg=0x376f436 "if $_inferior 
== 1", flag=1,
     from_tty=0) at /home/vries/gdb_versions/devel/src/gdb/breakpoint.c:9027
#15 0x0000000000568eb6 in tbreak_command (
     arg=0x376f420 "-qualified _ada_dummy if $_inferior == 1", from_tty=0)
     at /home/vries/gdb_versions/devel/src/gdb/breakpoint.c:9104
#16 0x000000000084f040 in run_command_1 (args=0x0, from_tty=0, 
run_how=RUN_STOP_AT_MAIN)
     at /home/vries/gdb_versions/devel/src/gdb/infcmd.c:433
#17 0x000000000084f555 in start_command (args=0x0, from_tty=0)
     at /home/vries/gdb_versions/devel/src/gdb/infcmd.c:537
#18 0x00000000005e9bd6 in do_simple_func (args=0x0, from_tty=0, c=0x2bcc0a0)
     at /home/vries/gdb_versions/devel/src/gdb/cli/cli-decode.c:95
#19 0x00000000005ee986 in cmd_func (cmd=0x2bcc0a0, args=0x0, from_tty=0)
     at /home/vries/gdb_versions/devel/src/gdb/cli/cli-decode.c:2543
#20 0x0000000000c3648f in execute_command (p=0x7fffffffe14f "", from_tty=0)
     at /home/vries/gdb_versions/devel/src/gdb/top.c:692
#21 0x00000000008faa55 in catch_command_errors (
     command=0xc35ec2 <execute_command(char const*, int)>, 
arg=0x7fffffffe14a "start",
     from_tty=0, do_bp_actions=true) at 
/home/vries/gdb_versions/devel/src/gdb/main.c:513
#22 0x00000000008fac2d in execute_cmdargs (cmdarg_vec=0x7fffffffd7a0, 
file_type=CMDARG_FILE,
     cmd_type=CMDARG_COMMAND, ret=0x7fffffffd77c)
     at /home/vries/gdb_versions/devel/src/gdb/main.c:608
#23 0x00000000008fbfbd in captured_main_1 (context=0x7fffffffd9e0)
     at /home/vries/gdb_versions/devel/src/gdb/main.c:1299
#24 0x00000000008fc1c0 in captured_main (data=0x7fffffffd9e0)
     at /home/vries/gdb_versions/devel/src/gdb/main.c:1320
#25 0x00000000008fc22b in gdb_main (args=0x7fffffffd9e0)
     at /home/vries/gdb_versions/devel/src/gdb/main.c:1345
#26 0x000000000041a24e in main (argc=13, argv=0x7fffffffdaf8)
     at /home/vries/gdb_versions/devel/src/gdb/gdb.c:32

  parent reply	other threads:[~2022-11-11 12:37 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 17:40 [PATCH] " Simon Marchi
2022-08-17 17:56 ` Simon Marchi
2022-08-31 14:03 ` Bruno Larsen
2022-11-04 16:52   ` Simon Marchi
2022-11-07  8:14     ` Bruno Larsen
2022-11-08 17:24     ` Tom Tromey
2022-09-01 10:42 ` Andrew Burgess
2022-11-04 17:24   ` Simon Marchi
     [not found]     ` <8735asb7cj.fsf@redhat.com>
2022-11-09 13:19       ` Simon Marchi
2022-11-08 19:43 ` Pedro Alves
2022-11-08 20:14   ` Simon Marchi
2022-11-08 21:09     ` Pedro Alves
2022-11-08 21:20       ` [PATCH v2] " Simon Marchi
2022-11-10 16:45         ` Pedro Alves
2022-11-10 17:33           ` Simon Marchi
2022-11-10 17:36             ` Simon Marchi
2022-11-10 17:47             ` Pedro Alves
2022-11-10 17:53               ` Simon Marchi
2022-11-11 12:37         ` Tom de Vries [this message]
2022-11-11 13:53           ` Simon Marchi
2022-11-11 15:21             ` Tom de Vries
2022-11-11 19:03               ` Simon Marchi
2022-11-12 10:43                 ` Tom de Vries
2022-11-14 11:29                 ` Tom de Vries
2022-11-14 13:19                   ` Simon Marchi
2022-11-14 14:18                     ` Tom de Vries
2022-11-16 16:22                     ` Tom Tromey
2022-11-16 16:26                       ` Simon Marchi

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=1c02e882-c19e-483e-e50c-634fbe282988@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).