[PATCH 00/23] Multi-target support

Pedro Alves palves@redhat.com
Wed Oct 16 19:08:00 GMT 2019


On 9/8/19 9:50 PM, Philippe Waroquiers wrote:

>>> (gdb) infer 1
>>> [Switching to inferior 1 [Remote target]
>>> (/home/philippe/valgrind/git/trunk_untouched/memcheck/tests/trivialleak)]
>>> [Switching to thread 1.1 (Thread 10050)]
>>> #0  0x0000000004001090 in _start () from /lib64/ld-linux-x86-64.so.2
>>> (gdb) c
>>> Continuing.
>>> Connection 2 (remote lvgdb --pid=16727) does not support multi-target resumption.
>>> (gdb)
>>>
>>> So, the continue command is refused both in inferior 1 and inferior 2.

I've finally debugged this, it was a simple bug in target.c.  We need this:

 @@ -2181,7 +2181,7 @@ user_visible_resume_ptid (int step)
  process_stratum_target *
  user_visible_resume_target (ptid_t resume_ptid)
  {
 -  return (resume_ptid == minus_one_ptid
 +  return (resume_ptid == minus_one_ptid && sched_multi
           ? NULL
           : current_inferior ()->process_target ());

I'm folding that into the main multi-target patch, which introduces
that function.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list