Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Target Management » Trying to do remote debuging on a AIX host from a Windows client
Trying to do remote debuging on a AIX host from a Windows client [message #23204] Mon, 19 May 2008 12:42 Go to next message
Eclipse User
Originally posted by: jens.persson.cx

Hello, I'm trying to set up a remote debugging environment for a existing
code base running on an AIX serve having varying levels of success.

I have the following design constraints:

* Clients will run Eclipse with CDT
* Server is running AIX
* I need to attach to a running process since the application uses vt220
graphics and need to be run from a terminal emulator (ie. WRQ Reflection
or PuTTY)
* The toolchain on the server needs to use IBMs xlc compiler

As a first shoot I created a wrapper around gdb that I set up eclipse to
use as the debugger. The wrapper forwards all commands given to it by
eclipse to a server running on AIX that forwards them to a gdb session
(after patching them up to change file paths and PIDs). Using this method
I have been able to start a session in a terminal session, then attach to
it from eclipse and finally debugging the server code with breakpoints,
variable inspection etc. This method works but it have some usability
problems (having eclipse popup a list of local processes that you have to
click trough etc.) that made me explore further.

I have tried various configurations using CDT, RSE both on europe and the
latest ganymede builds. I have the feeling that I'm close but I can't seem
to get the last inch :-)

Setting the make command to c:/cygwin/bin/ssh AIXhost make (and the
corresponding command for gdb) as per
http://wiki.eclipse.org/TM_and_RSE_FAQ#How_can_I_do_Remote_D ebugging_with_CDT.3F
This worked somewhat but I had key-problems and when I restarted eclipse
after fixing them I get:
(Cannot run program "c:\cygwin\bin\ssh.exe": The directory name is
invalid.)
:-(

I have gotten it to work on a linux host using gdbserver on the server but
gdbserver does not support AIX as a target (and it seems a little bit of
overkill since my remote running of gdb solves most of the problem)

I have looked at the HP plugin
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4c bcdc3f3515b49c108973a801/?ciid=c808f44064f02110f44064f021102 75d6e10RCRD
which seems to be the solution I'm looking for but for the wrong server OS.

Enough of my ramblings and on to the question:

Have any one solved something like this before?
Have this been documented somewhere?
Is there an other solution to the base problem that I have overlooked?

Best of everything and thanks for good tools (even if I cant seem to get
them to solve my current problem :-)

/jp

--
jens persson # This is good. It means that whiler Ionesco
<jens@persson.cx> # is dead, his spirit lives on.
Mäster Olofsväg 24 # --Gordon McMillan on how Windows attaches
S-224 66 LUND;SWEDEN # meaning to 3-character file extensions
Re: Trying to do remote debuging on a AIX host from a Windows client [message #23368 is a reply to message #23204] Tue, 20 May 2008 16:50 Go to previous messageGo to next message
Martin Oberhuber is currently offline Martin Oberhuber
Messages: 984
Registered: July 2009
Senior Member
I'd agree that you want gdb running on the remote in your case, and not
use gdbserver. I'd think that the HP tools should really work on any
UNIX but didn't ever try them myself.

For your ssh path / key problem, you might want to use putty (plink)
together with pageant.

Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm




jens persson wrote:
> Hello, I'm trying to set up a remote debugging environment for a
> existing code base running on an AIX serve having varying levels of
> success.
>
> I have the following design constraints:
>
> * Clients will run Eclipse with CDT
> * Server is running AIX
> * I need to attach to a running process since the application uses vt220
> graphics and need to be run from a terminal emulator (ie. WRQ Reflection
> or PuTTY)
> * The toolchain on the server needs to use IBMs xlc compiler
>
> As a first shoot I created a wrapper around gdb that I set up eclipse to
> use as the debugger. The wrapper forwards all commands given to it by
> eclipse to a server running on AIX that forwards them to a gdb session
> (after patching them up to change file paths and PIDs). Using this
> method I have been able to start a session in a terminal session, then
> attach to it from eclipse and finally debugging the server code with
> breakpoints, variable inspection etc. This method works but it have some
> usability problems (having eclipse popup a list of local processes that
> you have to click trough etc.) that made me explore further.
>
> I have tried various configurations using CDT, RSE both on europe and
> the latest ganymede builds. I have the feeling that I'm close but I
> can't seem to get the last inch :-)
>
> Setting the make command to c:/cygwin/bin/ssh AIXhost make (and the
> corresponding command for gdb) as per
> http://wiki.eclipse.org/TM_and_RSE_FAQ#How_can_I_do_Remote_D ebugging_with_CDT.3F
> This worked somewhat but I had key-problems and when I restarted eclipse
> after fixing them I get:
> (Cannot run program "c:\cygwin\bin\ssh.exe": The directory name is
> invalid.)
> :-(
>
> I have gotten it to work on a linux host using gdbserver on the server
> but gdbserver does not support AIX as a target (and it seems a little
> bit of overkill since my remote running of gdb solves most of the problem)
>
> I have looked at the HP plugin
> http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4c bcdc3f3515b49c108973a801/?ciid=c808f44064f02110f44064f021102 75d6e10RCRD
> which seems to be the solution I'm looking for but for the wrong server OS.
>
> Enough of my ramblings and on to the question:
>
> Have any one solved something like this before? Have this been
> documented somewhere?
> Is there an other solution to the base problem that I have overlooked?
>
> Best of everything and thanks for good tools (even if I cant seem to get
> them to solve my current problem :-)
>
> /jp
>
Re: Trying to do remote debuging on a AIX host from a Windows client [message #27162 is a reply to message #23368] Wed, 24 September 2008 11:50 Go to previous messageGo to next message
albert sutter is currently offline albert sutter
Messages: 8
Registered: July 2009
Junior Member
I have a constellation very similar to that of Jens: eclipse 3.4 on
windows - build, and test on aix. Thanks to Jens for the input. But I got
blocked I think at the same point. Starting gdb via puttys-plink via a
windows-batch works fine. The main line is:
j:\all\Software\NetScreen\Tools\putty\plink.exe prevoax1 -l xxx -pw yyy -i
gdb %2 %3 %4 %5 $HOME/abin %7 %8 $HOME/abin/%BAUSTEIN%mi%KOMPONENTE%
Woud be better not to use -l and -pw but I have to find out with our
AIX-Admin how it works with the private/public key.
In my case the gdb-call itself looks like this:
gdb -nw -i mi --cd $HOME/abin --command $HOME/vl/9506/test/.gdbinit
$HOME/abin/vlmi9506
But with a simple local project I saw, that in the gdb-session "cd
<windows-project-path>" is called again, even if "--cd <project-path>" is
already called from eclipse:
"(gdb)
30-environment-cd E:\\PAKTServer\\helloworldcpp
30^done"
As AIX does not know windows-paths gdb sends back: "E:\PAKTServer\vl9506:
A file or directory in the path name does not exist.."
Is it possible to suppress the second cd in the gdb-session or to
influence the directory sent to gdb by configuration? Or is there another
idea to work around that?
Thanks a lot for cdt anyway. AlSu
Re: Trying to do remote debuging on a AIX host from a Windows client [message #27202 is a reply to message #27162] Wed, 24 September 2008 17:39 Go to previous messageGo to next message
Martin Oberhuber is currently offline Martin Oberhuber
Messages: 984
Registered: July 2009
Senior Member
Hello Albert,

this is a very specific request for the CDT Debugger.
You may want to file a bug or enhancement request. Be
sure to give exact version information:
https://bugs.eclipse.org/bugs/enter_bug.cgi?component=Debug- MI&form_name=enter_bug&product=CDT

Another option could be using the Device Debug debugger
rather than the CDT one. You'll need DSF and the MI
integration:
http://www.eclipse.org/dsdp/dd

Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm




albert sutter wrote:
> I have a constellation very similar to that of Jens: eclipse 3.4 on
> windows - build, and test on aix. Thanks to Jens for the input. But I
> got blocked I think at the same point. Starting gdb via puttys-plink via
> a windows-batch works fine. The main line is:
> j:\all\Software\NetScreen\Tools\putty\plink.exe prevoax1 -l xxx -pw yyy
> -i gdb %2 %3 %4 %5 $HOME/abin %7 %8 $HOME/abin/%BAUSTEIN%mi%KOMPONENTE%
> Woud be better not to use -l and -pw but I have to find out with our
> AIX-Admin how it works with the private/public key.
> In my case the gdb-call itself looks like this:
> gdb -nw -i mi --cd $HOME/abin --command $HOME/vl/9506/test/.gdbinit
> $HOME/abin/vlmi9506
> But with a simple local project I saw, that in the gdb-session "cd
> <windows-project-path>" is called again, even if "--cd <project-path>"
> is already called from eclipse:
> "(gdb) 30-environment-cd E:\\PAKTServer\\helloworldcpp
> 30^done"
> As AIX does not know windows-paths gdb sends back:
> "E:\PAKTServer\vl9506: A file or directory in the path name does not
> exist.."
> Is it possible to suppress the second cd in the gdb-session or to
> influence the directory sent to gdb by configuration? Or is there
> another idea to work around that?
> Thanks a lot for cdt anyway. AlSu
>
Re: Trying to do remote debuging on a AIX host from a Windows client [message #30361 is a reply to message #27202] Fri, 12 December 2008 10:32 Go to previous messageGo to next message
albert sutter is currently offline albert sutter
Messages: 8
Registered: July 2009
Junior Member
Thanks a lot Martin,
at the end I got gdb run remotly anyhow now.
In Bug on the taskbar I took Debug Configurations - GDB Hardware Debugging.
In Main C/C++ Applications I set the full path on the Samba share of the
executable (X:\abin\vlmi9506). I also set a linked folder on X:\abin in
the project. Then I modified my batch-script in GDB Setup. It's not
directly calling gdb in the plink-session but a unix-shell-script, which
opens gdb. By this I have the chance to set some unix
environment-variables for the program before doing debug. The call in my
batch:
"plink.exe prevoax1 -l suttera -pw XXXXX -i
/proj/user/dev/suttera/vl/9506/test/vlmi9506ddd.run 20155 dev o m"
In the unix script I started gdb with the command line params from
eclipse, that I found in my former tryals. The call in the shell command
looks like this:
"gdb -nw -i mi -cd=$LVarPathExec $LVarPathExec/vlmi9506"
Then IBM just gives gdb 6.0 for AIX. I found version 6.8 in the net at
http://www.perzl.org/aix/index.php?n=Main.Gdb. Our Admin installed it.
I can now step through the program and watch variables. I even can write
gdb-commands directly in the console-view. yabadabadooooooo
Hope that helps to others as well. Can not tell, what was really the
winner-action.
But each answer gives more new questions. Now I got 3 of them.
1. When i start the debug config I have to click restart in the toolbar to
come really in the main procedure. Is it possible to come directly in main
without restarting?
2. On AIX our programs are first preprocessed for embedded sql. The
preprocessed c-source is put in another directory. When I duble-click the
line to set a breakpoint, I get the warning "unresolved breakpoint" and in
the gdb-console I see, that the break is set to the preprocessed source
which is wrong. Is it possible to set the breakpoints on the right source?
3. We are using CICS on AIX. With the xldb-Debugger and the CDCN-command
of CICS we manage that debugging is started, when we come in our programs.
Is it possible to get that remotely (in plink) with gdb-eclipse as well?

http://www.eclipse.org/dsdp/dd and tm was not so easy to install, but I
tried that as well and succeeded on local programs in cygwin. But AIX via
putty had also some path-conversion problems. I also created a BUG to ease
the working directroy problems.
Re: Trying to do remote debuging on a AIX host from a Windows client [message #30395 is a reply to message #30361] Fri, 12 December 2008 19:03 Go to previous messageGo to next message
Andrew Gvozdev is currently offline Andrew Gvozdev
Messages: 255
Registered: July 2009
Senior Member
albert sutter wrote:


> 2. On AIX our programs are first preprocessed for embedded sql. The
> preprocessed c-source is put in another directory. When I duble-click the
> line to set a breakpoint, I get the warning "unresolved breakpoint" and in
> the gdb-console I see, that the break is set to the preprocessed source
> which is wrong. Is it possible to set the breakpoints on the right source?

Check your sql preprocessor, it may have a switch to generate that
information for debugger in form of C preprocessor directives #line. For
example it could produce generated file verifyDB.c from verifyDB.sc:

/*
** Generated code begins here.
*/
# line 1 "verifyDB.sc"

/*
** This file was generated on Fri Dec 12 12:21:04 2008
** by Sybase Embedded SQL Preprocessor Sybase ESQL/C
Precompiler/12
** .5/P-EBF11061 ESD#11/DRV.12.5.0.6/RS6000/AIX
4.3.3/BUILD125-029/O
** PT/Thu Nov 25 23:06:50 2004
*/
/*********************************************************** *****************
** Embedded SQL commands for error handling
**
************************************************************ ****************/
static
/*
** SQL STATEMENT: 1
** EXEC SQL INCLUDE SQLCA;

*/
# line 26 "verifyDB.sc"
# line 26 "verifyDB.sc"
SQLCA sqlca;

/*
** Generated code ends here.
*/
# line 26 "verifyDB.sc"

int openVerifyDBConnection()
{
int rc = 0;

/* secret proprietary code removed of course */

return rc;
}

So the debugger would rather point to line 26 etc. of "verifyDB.sc".

Andrew
Re: Trying to do remote debuging on a AIX host from a Windows client [message #30467 is a reply to message #30395] Tue, 16 December 2008 10:20 Go to previous messageGo to next message
albert sutter is currently offline albert sutter
Messages: 8
Registered: July 2009
Junior Member
Hello Andrew
yes I got lines with the line-directive. I was first stepping through the
c-file with the main-function. In this file we do not have sql but it's
also copied with one line-directive on top:
#line 1 "/proj/user/dev/suttera/vl/9506/src/vlmi9506.c"
Typing directly the break in the gdb-console works out and even sets the
breakpoint in the eclipse-gui. Here an example:
break "/proj/user/dev/suttera/vl/9506/src/vlmi9506.c":245

I tried to configure gdb with the directory command line paramater, the
command "set substitute-path" and the "dir"-command. The gdb description
looked not so bad, but it did'nt succeed and even break set in console
did'nt function after that

DDD shows a choose-dialog, in which one can select between the 2
source-files to put the breakpoint.
Re: Trying to do remote debuging on a AIX host from a Windows client [message #36118 is a reply to message #30467] Tue, 23 June 2009 14:02 Go to previous messageGo to next message
Olexiy Buyanskyy is currently offline Olexiy Buyanskyy
Messages: 7
Registered: July 2009
Junior Member
Hi,

Which preprocessor do you use?
In my case we used sybase (cpre) and UDB (db2 prep).
And solution for us was use relational paths.

#line 19
" src/com/lowes/so/equipment/terminaldb/U_ADZT010A_select_3040 _16.sc "


--
Olexiy
Re: Trying to do remote debuging on a AIX host from a Windows client [message #36253 is a reply to message #30361] Thu, 25 June 2009 23:15 Go to previous message
Olexiy Buyanskyy is currently offline Olexiy Buyanskyy
Messages: 7
Registered: July 2009
Junior Member
Can you explain "Then I modified my batch-script in GDB Setup. It's not
directly calling gdb in the plink-session but a unix-shell-script"

What batch-script are you talking about?

Thanks
Olexiy
Re: Trying to do remote debuging on a AIX host from a Windows client [message #574861 is a reply to message #23204] Tue, 20 May 2008 16:50 Go to previous message
Martin Oberhuber is currently offline Martin Oberhuber
Messages: 984
Registered: July 2009
Senior Member
I'd agree that you want gdb running on the remote in your case, and not
use gdbserver. I'd think that the HP tools should really work on any
UNIX but didn't ever try them myself.

For your ssh path / key problem, you might want to use putty (plink)
together with pageant.

Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm




jens persson wrote:
> Hello, I'm trying to set up a remote debugging environment for a
> existing code base running on an AIX serve having varying levels of
> success.
>
> I have the following design constraints:
>
> * Clients will run Eclipse with CDT
> * Server is running AIX
> * I need to attach to a running process since the application uses vt220
> graphics and need to be run from a terminal emulator (ie. WRQ Reflection
> or PuTTY)
> * The toolchain on the server needs to use IBMs xlc compiler
>
> As a first shoot I created a wrapper around gdb that I set up eclipse to
> use as the debugger. The wrapper forwards all commands given to it by
> eclipse to a server running on AIX that forwards them to a gdb session
> (after patching them up to change file paths and PIDs). Using this
> method I have been able to start a session in a terminal session, then
> attach to it from eclipse and finally debugging the server code with
> breakpoints, variable inspection etc. This method works but it have some
> usability problems (having eclipse popup a list of local processes that
> you have to click trough etc.) that made me explore further.
>
> I have tried various configurations using CDT, RSE both on europe and
> the latest ganymede builds. I have the feeling that I'm close but I
> can't seem to get the last inch :-)
>
> Setting the make command to c:/cygwin/bin/ssh AIXhost make (and the
> corresponding command for gdb) as per
> http://wiki.eclipse.org/TM_and_RSE_FAQ#How_can_I_do_Remote_D ebugging_with_CDT.3F
> This worked somewhat but I had key-problems and when I restarted eclipse
> after fixing them I get:
> (Cannot run program "c:\cygwin\bin\ssh.exe": The directory name is
> invalid.)
> :-(
>
> I have gotten it to work on a linux host using gdbserver on the server
> but gdbserver does not support AIX as a target (and it seems a little
> bit of overkill since my remote running of gdb solves most of the problem)
>
> I have looked at the HP plugin
> http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4c bcdc3f3515b49c108973a801/?ciid=c808f44064f02110f44064f021102 75d6e10RCRD
> which seems to be the solution I'm looking for but for the wrong server OS.
>
> Enough of my ramblings and on to the question:
>
> Have any one solved something like this before? Have this been
> documented somewhere?
> Is there an other solution to the base problem that I have overlooked?
>
> Best of everything and thanks for good tools (even if I cant seem to get
> them to solve my current problem :-)
>
> /jp
>
Re: Trying to do remote debuging on a AIX host from a Windows client [message #577202 is a reply to message #23368] Wed, 24 September 2008 11:50 Go to previous message
albert sutter is currently offline albert sutter
Messages: 8
Registered: July 2009
Junior Member
I have a constellation very similar to that of Jens: eclipse 3.4 on
windows - build, and test on aix. Thanks to Jens for the input. But I got
blocked I think at the same point. Starting gdb via puttys-plink via a
windows-batch works fine. The main line is:
j:\all\Software\NetScreen\Tools\putty\plink.exe prevoax1 -l xxx -pw yyy -i
gdb %2 %3 %4 %5 $HOME/abin %7 %8 $HOME/abin/%BAUSTEIN%mi%KOMPONENTE%
Woud be better not to use -l and -pw but I have to find out with our
AIX-Admin how it works with the private/public key.
In my case the gdb-call itself looks like this:
gdb -nw -i mi --cd $HOME/abin --command $HOME/vl/9506/test/.gdbinit
$HOME/abin/vlmi9506
But with a simple local project I saw, that in the gdb-session "cd
<windows-project-path>" is called again, even if "--cd <project-path>" is
already called from eclipse:
"(gdb)
30-environment-cd E:\\PAKTServer\\helloworldcpp
30^done"
As AIX does not know windows-paths gdb sends back: "E:\PAKTServer\vl9506:
A file or directory in the path name does not exist.."
Is it possible to suppress the second cd in the gdb-session or to
influence the directory sent to gdb by configuration? Or is there another
idea to work around that?
Thanks a lot for cdt anyway. AlSu
Re: Trying to do remote debuging on a AIX host from a Windows client [message #577219 is a reply to message #27162] Wed, 24 September 2008 17:39 Go to previous message
Martin Oberhuber is currently offline Martin Oberhuber
Messages: 984
Registered: July 2009
Senior Member
Hello Albert,

this is a very specific request for the CDT Debugger.
You may want to file a bug or enhancement request. Be
sure to give exact version information:
https://bugs.eclipse.org/bugs/enter_bug.cgi?component=Debug- MI&form_name=enter_bug&product=CDT

Another option could be using the Device Debug debugger
rather than the CDT one. You'll need DSF and the MI
integration:
http://www.eclipse.org/dsdp/dd

Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm




albert sutter wrote:
> I have a constellation very similar to that of Jens: eclipse 3.4 on
> windows - build, and test on aix. Thanks to Jens for the input. But I
> got blocked I think at the same point. Starting gdb via puttys-plink via
> a windows-batch works fine. The main line is:
> j:\all\Software\NetScreen\Tools\putty\plink.exe prevoax1 -l xxx -pw yyy
> -i gdb %2 %3 %4 %5 $HOME/abin %7 %8 $HOME/abin/%BAUSTEIN%mi%KOMPONENTE%
> Woud be better not to use -l and -pw but I have to find out with our
> AIX-Admin how it works with the private/public key.
> In my case the gdb-call itself looks like this:
> gdb -nw -i mi --cd $HOME/abin --command $HOME/vl/9506/test/.gdbinit
> $HOME/abin/vlmi9506
> But with a simple local project I saw, that in the gdb-session "cd
> <windows-project-path>" is called again, even if "--cd <project-path>"
> is already called from eclipse:
> "(gdb) 30-environment-cd E:\\PAKTServer\\helloworldcpp
> 30^done"
> As AIX does not know windows-paths gdb sends back:
> "E:\PAKTServer\vl9506: A file or directory in the path name does not
> exist.."
> Is it possible to suppress the second cd in the gdb-session or to
> influence the directory sent to gdb by configuration? Or is there
> another idea to work around that?
> Thanks a lot for cdt anyway. AlSu
>
Re: Trying to do remote debuging on a AIX host from a Windows client [message #578168 is a reply to message #27202] Fri, 12 December 2008 10:32 Go to previous message
albert sutter is currently offline albert sutter
Messages: 8
Registered: July 2009
Junior Member
Thanks a lot Martin,
at the end I got gdb run remotly anyhow now.
In Bug on the taskbar I took Debug Configurations - GDB Hardware Debugging.
In Main C/C++ Applications I set the full path on the Samba share of the
executable (X:\abin\vlmi9506). I also set a linked folder on X:\abin in
the project. Then I modified my batch-script in GDB Setup. It's not
directly calling gdb in the plink-session but a unix-shell-script, which
opens gdb. By this I have the chance to set some unix
environment-variables for the program before doing debug. The call in my
batch:
"plink.exe prevoax1 -l suttera -pw XXXXX -i
/proj/user/dev/suttera/vl/9506/test/vlmi9506ddd.run 20155 dev o m"
In the unix script I started gdb with the command line params from
eclipse, that I found in my former tryals. The call in the shell command
looks like this:
"gdb -nw -i mi -cd=$LVarPathExec $LVarPathExec/vlmi9506"
Then IBM just gives gdb 6.0 for AIX. I found version 6.8 in the net at
http://www.perzl.org/aix/index.php?n=Main.Gdb Our Admin installed it.
I can now step through the program and watch variables. I even can write
gdb-commands directly in the console-view. yabadabadooooooo
Hope that helps to others as well. Can not tell, what was really the
winner-action.
But each answer gives more new questions. Now I got 3 of them.
1. When i start the debug config I have to click restart in the toolbar to
come really in the main procedure. Is it possible to come directly in main
without restarting?
2. On AIX our programs are first preprocessed for embedded sql. The
preprocessed c-source is put in another directory. When I duble-click the
line to set a breakpoint, I get the warning "unresolved breakpoint" and in
the gdb-console I see, that the break is set to the preprocessed source
which is wrong. Is it possible to set the breakpoints on the right source?
3. We are using CICS on AIX. With the xldb-Debugger and the CDCN-command
of CICS we manage that debugging is started, when we come in our programs.
Is it possible to get that remotely (in plink) with gdb-eclipse as well?

http://www.eclipse.org/dsdp/dd and tm was not so easy to install, but I
tried that as well and succeeded on local programs in cygwin. But AIX via
putty had also some path-conversion problems. I also created a BUG to ease
the working directroy problems.
Re: Trying to do remote debuging on a AIX host from a Windows client [message #578188 is a reply to message #30361] Fri, 12 December 2008 19:03 Go to previous message
Andrew Gvozdev is currently offline Andrew Gvozdev
Messages: 255
Registered: July 2009
Senior Member
albert sutter wrote:


> 2. On AIX our programs are first preprocessed for embedded sql. The
> preprocessed c-source is put in another directory. When I duble-click the
> line to set a breakpoint, I get the warning "unresolved breakpoint" and in
> the gdb-console I see, that the break is set to the preprocessed source
> which is wrong. Is it possible to set the breakpoints on the right source?

Check your sql preprocessor, it may have a switch to generate that
information for debugger in form of C preprocessor directives #line. For
example it could produce generated file verifyDB.c from verifyDB.sc:

/*
** Generated code begins here.
*/
# line 1 "verifyDB.sc"

/*
** This file was generated on Fri Dec 12 12:21:04 2008
** by Sybase Embedded SQL Preprocessor Sybase ESQL/C
Precompiler/12
** .5/P-EBF11061 ESD#11/DRV.12.5.0.6/RS6000/AIX
4.3.3/BUILD125-029/O
** PT/Thu Nov 25 23:06:50 2004
*/
/*********************************************************** *****************
** Embedded SQL commands for error handling
**
************************************************************ ****************/
static
/*
** SQL STATEMENT: 1
** EXEC SQL INCLUDE SQLCA;

*/
# line 26 "verifyDB.sc"
# line 26 "verifyDB.sc"
SQLCA sqlca;

/*
** Generated code ends here.
*/
# line 26 "verifyDB.sc"

int openVerifyDBConnection()
{
int rc = 0;

/* secret proprietary code removed of course */

return rc;
}

So the debugger would rather point to line 26 etc. of "verifyDB.sc".

Andrew
Re: Trying to do remote debuging on a AIX host from a Windows client [message #578221 is a reply to message #30395] Tue, 16 December 2008 10:20 Go to previous message
albert sutter is currently offline albert sutter
Messages: 8
Registered: July 2009
Junior Member
Hello Andrew
yes I got lines with the line-directive. I was first stepping through the
c-file with the main-function. In this file we do not have sql but it's
also copied with one line-directive on top:
#line 1 "/proj/user/dev/suttera/vl/9506/src/vlmi9506.c"
Typing directly the break in the gdb-console works out and even sets the
breakpoint in the eclipse-gui. Here an example:
break "/proj/user/dev/suttera/vl/9506/src/vlmi9506.c":245

I tried to configure gdb with the directory command line paramater, the
command "set substitute-path" and the "dir"-command. The gdb description
looked not so bad, but it did'nt succeed and even break set in console
did'nt function after that

DDD shows a choose-dialog, in which one can select between the 2
source-files to put the breakpoint.
Re: Trying to do remote debuging on a AIX host from a Windows client [message #581233 is a reply to message #30467] Tue, 23 June 2009 14:02 Go to previous message
Olexiy Buyanskyy is currently offline Olexiy Buyanskyy
Messages: 7
Registered: July 2009
Junior Member
Hi,

Which preprocessor do you use?
In my case we used sybase (cpre) and UDB (db2 prep).
And solution for us was use relational paths.

#line 19
" src/com/lowes/so/equipment/terminaldb/U_ADZT010A_select_3040 _16.sc "


--
Olexiy
Re: Trying to do remote debuging on a AIX host from a Windows client [message #581299 is a reply to message #30361] Thu, 25 June 2009 23:15 Go to previous message
Olexiy Buyanskyy is currently offline Olexiy Buyanskyy
Messages: 7
Registered: July 2009
Junior Member
Can you explain "Then I modified my batch-script in GDB Setup. It's not
directly calling gdb in the plink-session but a unix-shell-script"

What batch-script are you talking about?

Thanks
Olexiy
Previous Topic:Folder/File rights (chwon/chmod)
Next Topic:TM 3.1 is released with Galileo
Goto Forum:
  


Current Time: Thu Oct 23 08:11:56 GMT 2014

Powered by FUDForum. Page generated in 0.02217 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software