Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Kevin Pouget <kevin.pouget@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Multiple remote inferiors
Date: Fri, 08 Apr 2011 10:02:00 -0000	[thread overview]
Message-ID: <20110408100224.GA29376@host1.jankratochvil.net> (raw)
In-Reply-To: <BANLkTinH3tUpZdGD2sGUa3h0mLuYTQk1BA@mail.gmail.com>

On Fri, 08 Apr 2011 11:42:55 +0200, Kevin Pouget wrote:
> --> should it be possible to start _two different_ processes from a
> single GDBServer ?

yes, I have already seen it working.


> here is what I got (debugging functionPtr and stackoverflow):
> 
> > $ gdbserver :1234 functionPtr

I would say --multi should be here.


> > GNU gdb (GDB) Fedora (7.2-46.fc14)

Reproduced also with: GNU gdb (GDB) 7.3.50.20110408-cvs

$ gdbserver --multi :1234
Listening on port 1234
Remote debugging from host 127.0.0.1
Process /home/jkratoch/t/1 created; pid = 1921
Process /home/jkratoch/t/2 created; pid = 1968

$ gdb ~/t/1
GNU gdb (GDB) 7.3.50.20110408-cvs
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/jkratoch/t/1...done.
(gdb) target extended-remote localhost:1234
Remote debugging using localhost:1234
(gdb) set remote exec-file /home/jkratoch/t/1
(gdb) start
Temporary breakpoint 1 at 0x400483: file 1.c, line 5.
Starting program: /home/jkratoch/t/1 

Temporary breakpoint 1, main () at 1.c:5
5	  return f ();
(gdb) add-inferior 
Added inferior 2
(gdb) inferior 2
[Switching to inferior 2 [Thread 0.0] (<noexec>)]
(gdb) set remote exec-file /home/jkratoch/t/2
(gdb) file /home/jkratoch/t/2
Reading symbols from /home/jkratoch/t/2...done.
(gdb) start
Temporary breakpoint 2 at 0x400478: file 2.c, line 4.
Starting program: /home/jkratoch/t/2 
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Malformed response to offset query, timeout
(gdb) q



Thanks,
Jan


  reply	other threads:[~2011-04-08 10:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06 15:02 Kevin Pouget
2011-04-06 17:44 ` Pedro Alves
2011-04-06 18:50   ` Kevin Pouget
2011-04-06 19:30     ` Pedro Alves
     [not found]       ` <BANLkTinjtiS6cp6WpS=8FULQJdxWuO7K8Q@mail.gmail.com>
2011-04-08  9:43         ` Kevin Pouget
2011-04-08 10:02           ` Jan Kratochvil [this message]
2011-04-08 10:00         ` Pedro Alves

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=20110408100224.GA29376@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=kevin.pouget@gmail.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