Fix -list-thread-groups --available logic and add test
authorSimon Marchi <simon.marchi@ericsson.com>
Wed, 4 Oct 2017 16:44:01 +0000 (12:44 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Wed, 4 Oct 2017 16:44:01 +0000 (12:44 -0400)
commit4c71c1059f876fcca9809f7b6372b721ddb83635
tree36a46dcff03672071dff54be9542c47f35e7660e
parent73dcd72d4eeec176f769660ddcdefd1f25d0a2ec
Fix -list-thread-groups --available logic and add test

New in v3:

- Replace use_gdb_stub with can_spawn_for_attach.
- Call kill_wait_spawned_process on spawn_ids.

Commit

  Use std::set in mi-main.c
  52f9abe4c739f42cc5f80b2629276493ac6306f9

changed the logic of the "-list-thread-groups --available" by mistake
when a pid is passed.  It prints all the processes except the one
specified by the given pid.  The correct behavior is to only print the
process corresponding to that pid.  this patch fixes that and adds a test.

gdb/ChangeLog:

* mi/mi-main.c (list_available_thread_groups): Reverse filter logic.

gdb/testsuite/ChangeLog:

* gdb.mi/list-thread-groups-available.exp: New file.
* gdb.mi/list-thread-groups-available.c: New file.
gdb/ChangeLog
gdb/mi/mi-main.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/list-thread-groups-available.c [new file with mode: 0644]
gdb/testsuite/gdb.mi/list-thread-groups-available.exp [new file with mode: 0644]
This page took 0.025207 seconds and 4 git commands to generate.