Home » Language IDEs » C / C++ IDE (CDT) » Received a SIGSEGV when starting debugging on HP-UX 11.11 with RC2 and M9
Received a SIGSEGV when starting debugging on HP-UX 11.11 with RC2 and M9 [message #106773] |
Sat, 19 June 2004 02:02 |
Eclipse User |
|
|
|
Hi,
I'm trying to see if debugging will on HP-UX 11.11. I installed Eclipse
3.0RC2, CDT 2M9, gcc3.3.3, gdb 6.1. I applied patch PHSS_288771, which fixed
ld (+init) problem for C++ code. on HP-UX, I used Eclipse menu Help |
Software Updates to install CDT 2 M9. I'm not sure if correct HP version of
CDT was automatically selected and installed by Eclipse.
I created a Managed Make C project with a program, which was downloaded from
hp gdb site. The program is listed below, and also attached.
Problem 1:
When I did initial build, only make files were created under Debug
sub-directory. There was no object or executable files created. Then I did
Clean... with immediately rebuild option, and got the following error:
**** Full rebuild of configuration Debug for project debugC ****
make -k clean all
Make: line 6: syntax error. Stop.
Build complete for project debugC
Problem 2:
I got around of this problem by manually invoke "make all" under the Debug
directory to generate the executable file "debugC". Here came the 2nd
problem. I selected menu Run..., under main tab, for C/C++ application input
box, I selected "Search" button, according to tutorial, executable debugC
should show up in the dialog, but the dialog contained no file name to be
selected.
Problem 3:
I then selected "Browse" button, in the dialog I selected debugC under Debug
directory. However the error message on the dialog was: "Selection must be a
binary file.", and OK button was disabled, so I cannot select file DebugC.
Problem 4 (the main problem):
I got around the above problem by directly input "Debug/debugC" into the
"C/C++ Application" box. Start to run, and got correct output. Then I invoke
menu Debug..., under GDB Debug node, I got a child node:
Thread [1] (Suspended) <Stack is not available
!src.MISession.Target_Not_Responding>
When selecting Debug Console node, I got:
info threads
No registers.
info program
Using the running image of child process 22696.
Program stopped at 0x1b38.
It stopped at a breakpoint that has since been deleted.
Type "info stack" or "info registers" for more information.
info threads
* 1 system thread 22696
After 1~3 minutes, all debug nodes were terminated, and the console in IDE
outputted:
~"Stopped due to shared library event
And in the terminal, I got:
Pid 22695 received a SIGSEGV for stack growth failure.
Possible causes: insufficient memory or swap space,
or stack size exceeded maxssiz.
To my understanding, for such a simple program, the program (average.c)
itself should not use so much memory. BTW, I build gdb 6.1 by myself. I
guess it should contain support for mi.
May anyone please let me know where the problem lies: my configuration, gdb,
HP-UX 11.11 or CDT? Any suggestions about how to fix or workaround it?
I'd highly appreciate any help with making debugging work on HP-UX!
Thanks,
Robert Fu
---------------------- code ---------------
/* "average.c" */
#include <stdio.h>
#define num 10
#define first 0
#define last num-1
static int my_list[num] = {3,4,2,0,2,1,8,3,6,7};
int sum(int list[], int low, int high)
{
int i, s = 0;
for (i = low; i <= high; i++)
s += list[i];
return(s);
}
void print_average(int list[], int low, int high)
{
int total, num_elements, average;
total = sum(list, low, high);
num_elements = high - low; /* note this is an off-by-one bug */
average = total / num_elements;
printf("%10.d\n", average);
}
int main(void)
{
/* Try two test cases. */
print_average (my_list, first, last);
print_average (my_list, first, last - 3);
return 0;
}
Just in case the problem is related to plugin.xml, which I didn't change,
the file is also listed here:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
id="org.eclipse.cdt.debug.mi.core"
name="%pluginName"
version="2.0.0"
provider-name="%providerName"
class="org.eclipse.cdt.debug.mi.core.MIPlugin">
<runtime>
<library name="cdtmicore.jar">
<export name="*"/>
</library>
</runtime>
<requires>
<import plugin="org.eclipse.cdt.debug.core"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.debug.core"/>
<import plugin="org.eclipse.cdt.core"/>
<import plugin="org.eclipse.core.runtime"/>
</requires>
<extension
point="org.eclipse.cdt.debug.core.CDebugger">
<debugger
platform="native"
name="%GDBDebugger.name"
modes="run,core,attach"
cpu="native"
class="org.eclipse.cdt.debug.mi.core.GDBDebugger"
id="org.eclipse.cdt.debug.mi.core.CDebugger">
</debugger>
<debugger
platform="win32"
name="%CygwinGDBDebugger.name"
modes="run,core,attach"
cpu="native"
class="org.eclipse.cdt.debug.mi.core.CygwinGDBDebugger"
id="org.eclipse.cdt.debug.mi.core.CygwinCDebugger">
</debugger>
<debugger
platform="*"
name="%GDBServer.name"
modes="run"
cpu="*"
class="org.eclipse.cdt.debug.mi.core.GDBServerDebugger"
id="org.eclipse.cdt.debug.mi.core.GDBServerCDebugger">
</debugger>
</extension>
</plugin>
Attachment: average.c
(Size: 0.69KB, Downloaded 137 times)
|
|
|
Goto Forum:
Current Time: Tue Jul 22 06:34:45 EDT 2025
Powered by FUDForum. Page generated in 0.04935 seconds
|