Commit b65ed0d
Fix unexpected argument splitting
This doesn't work:
$ isolate-gpu -d 2 ./gdb -nx -q --data-directory=data-directory testsuite/outputs/gdb.rocm/simple/simple -ex "with breakpoint pending on -- break do_an_addition"
Excess command line arguments ignored. (pending ...)
Reading symbols from testsuite/outputs/gdb.rocm/simple/simple...
/home/smarchi/build/binutils-gdb-amd-staging/gdb/breakpoint: No such file or directory.
Missing arguments.
(gdb)
The argument `"with breakpoint ..."` gets split along the way. Fix it
by using "$@", which doesn't split the args that contain spaces.
Change the "else" portion just to match the style of the "if" section.
With this patch, I get the expected:
$ isolate-gpu -d 2 ./gdb -nx -q --data-directory=data-directory testsuite/outputs/gdb.rocm/simple/simple -ex "with breakpoint pending on -- break do_an_addition"
Reading symbols from testsuite/outputs/gdb.rocm/simple/simple...
Function "do_an_addition" not defined.
Breakpoint 1 (do_an_addition) pending.
(gdb)1 parent 1c5b4a6 commit b65ed0d
1 file changed
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 9 | + | |
9 | 10 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 11 | + | |
13 | 12 | | |
0 commit comments