Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] gdbserver "attach" doesn't fully init the session?

Thanks Toni and Marc,

 

I’m starting to see a little clearer … one question regarding the gdbserver’s “multi-Process Attach”:

 

When I attach multiple processes through one gdbserver, is there any extra benefit compared to attaching multiple processes with one gdbserver each ?

For example, could I set a breakpoint in process A that would also stop process B ?

 

The reasons why we’re not going with the green button multi-attach right now include

-          Bug 400033 : In a Cross setup, it’s very awkward having to browse to the local exe path when the remote path could be mapped automatically

-          Gdbserver lifecycle: One gdbserver –multi on the remote seems not sufficient. At least to me on Luna SR2 it’s unclear how to “add another attach” to an existing attached process (the green attach button is disabled after the initial attach). On the other hand, if Eclipse starts the gdbserver when does it die ?

-          Workflow: After running the “Attach Launch” it’s awkward having to click “Attach” again inside the debugger.

-          Consistency: “Run” Launches are started outside the debugger, but “Attach” is done inside the debugger

 

How are others solving this ?

Any comments / thoughts would be welcome.

 

BTW, BIG BIG thanks to the whole CDT community for your responsiveness. I’m amazed time and again about your timely expert answers to my many questions J

 

Thanks,

Martin

--

Martin Oberhuber, SMTS / Product Owner – Development Tools, Wind River

direct +43.662.457915.85  fax +43.662.457915.6

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Leherbauer, Anton (Toni)
Sent: Friday, May 29, 2015 1:44 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] gdbserver "attach" doesn't fully init the session?

 

I believe this boils down to https://bugs.eclipse.org/bugs/show_bug.cgi?id=422322.

If gdbserver is already attached to a process, the launch sequence misses the attach to process step.

 

Toni

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Oberhuber, Martin
Sent: Friday, May 29, 2015 12:59 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] gdbserver "attach" doesn't fully init the session?

 

Hi CDT/Debug Experts,

 

We are trying to create a CDT/GDB/DSF “Attach to remote gdbserver” launch, where the

remote gdbserver has already attached the selected PID. Essentially:

 

# On the remote

gdbserver --once –-attach :2345 $mypid

# In the launch

# - Set /local/path/to/myexe

# - Under GDB: Set /path/to/crossgdb.sh
#   - Connection, enter remotehost:2345

 

The Launch connects successfully, we get a proper backtrace and run control works.

But we cannot set breakpoints.

Looking at the gdb traces, it seems that much of the init sequence is missing in this case.

When we run “gdbserver --multi” on the remote, and we click the green “attach” button

In the debug view, everything does work as expected and there’s many more commands

sent to GDB.

 

Is our approach invalid (ie is only the green “attach” button in the debug view supported these days)?

Or is there anything we’ve been missing ?

 

I guess I’m confused about “Automatic Remote Launch” versus “Manual Remote Launch” …

Any hints / comments would be most appreciated !

 

Thanks,

Martin

--

Martin Oberhuber, SMTS / Product Owner – Development Tools, Wind River

direct +43.662.457915.85  fax +43.662.457915.6

 


Back to the top