diff options
author | Tom de Vries <tdevries@suse.de> | 2023-03-24 10:45:37 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-03-24 10:45:37 +0100 |
commit | c569a946f6925d3f210c3eaf74dcda56843350ef (patch) | |
tree | 810910c33bbc22a669a7d72df325cc48f0923e1a /libctf/ctf-dedup.c | |
parent | 1985d8cb7048bcfce60b59cfe219d3b09bda6373 (diff) | |
download | binutils-c569a946f6925d3f210c3eaf74dcda56843350ef.zip binutils-c569a946f6925d3f210c3eaf74dcda56843350ef.tar.gz binutils-c569a946f6925d3f210c3eaf74dcda56843350ef.tar.bz2 |
[gdb/testsuite] Fix unbalanced quotes in mi_expect_stop argument
In proc mi_expect_stop there's a proc argument reason that's handled like so:
...
set r "reason=\"$reason\","
...
That's fine for say:
...
set reason "foo"
...
for which this evaluates to:
...
set r "reason=\"foo\","
...
But there are more complex uses, for instance:
...
set reason "breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal"
...
which evaluates to:
...
set r "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal\""
...
Note how in this reason argument, the first two '\"' seems to form a pair
surrounding ',disp=', which is not the case, which is confusing.
Fix this by only adding the quotes in mi_expect_stop if the string doesn't
already contain quotes, such that we have the more readable:
...
set reason "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal\""
...
Tested on x86_64-linux.
Diffstat (limited to 'libctf/ctf-dedup.c')
0 files changed, 0 insertions, 0 deletions