I still don’t
quite understand why the change was needed for program
arguments. The GDBBackend object used from DebugNewProcess
do the exact same thing to get the program arguments (They
get the arguments from the launch configuration and perform
the substitution). Ans since the GDBBackend object and the
DebugNewProcess object have the same launchConfiguration,
why does this matter for multiple processes?
Thanks,
Joseph Henry.
Hi Joseph,
when
IGDBBackend was introduced CDT did not allow to debug
multiple processes at once. The idea behind that interface
was based on the fact that there was a single set of
information (such as the program arguments) for the entire
debug session. When we added support for multi-process
debugging, this assumption was no longer valid and some of
the calls to IGDBBackend could no longer be used. That
interface needs to be revisited to support multi-process
properly. This wasn’t done yet because it also required
some multi-process support in the launch configuration,
which we don’t have yet. However, this work is in progress
(for the launch configuration).
For your needs,
I think you will need to override DebugNewProcessSequence
and massage the parameters there, or you will need to change
them in the launch configuration itself.
Sorry for the
hassle.
Marc
Upon further
reflection, this issue seems to me like a regression of
functionality introduced in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=240092.
The bug
mentioned seems to take great care into making sure that
the gdb integration was extensible, and the change to
having
org.eclipse.cdt.dsf.gdb.service.DebugNewProcessSequence.stepSetArguments(RequestMonitor)
not use
org.eclipse.cdt.dsf.gdb.service.IGDBBackend.getProgramArguments(),
in my mind is a bug.
Does anyone
else have any comments on this?
Joseph Henry.
From: Joseph Henry
Sent: Wednesday, June 18, 2014 4:20 PM
To: 'CDT General developers list.'
Subject: GDB extension not working in CDT 8.4
Hi all,
I recently wrote and extension to the GDB
integration provided with CDT.
The people on this mailing list helped
immensely, and I was able to get a GDB over SSH working for
eclipse Juno.
I have been working on updating our
plugin to work with eclipse 8.4 (RC4) and the only problem I
have ran into so far is that my gdb session does not work
any more.
The problem is, is that in Juno the GDB
program args were controlled by the
IGDBBackend.getProgramArguments, and now in 8.4 the
DebugNewProcessSequence.stepSetArguments method just gets
the args from the configuration directly. This is a problem
because the args need to be “massaged” a bit for this to
work.
Any suggestions on how I could get this
working?]
Thanks,
Joseph Henry.