HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- adb to debug core file
Operating System - HP-UX
1827439
Members
5834
Online
109965
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 02:57 AM
11-11-2004 02:57 AM
adb to debug core file
Hi All,
I need to debug a core file with adb command, but I have problem to understand the right way to run it.
Can someone help me to understand the correct syntax to work fine this command??
Thanks and best regards,
Vinc.
I need to debug a core file with adb command, but I have problem to understand the right way to run it.
Can someone help me to understand the correct syntax to work fine this command??
Thanks and best regards,
Vinc.
- Tags:
- adb
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 03:28 AM
11-11-2004 03:28 AM
Re: adb to debug core file
Compared to gdb, adb is very limited so if you can, use gdb. Life is also easier if you can compile with the -g flag to include symbol/debugger data in the object file. In either debugger, the starting point is the stacktrace.
Invoke adb as "adb myexe core"
$c
$c
$c -- stack trace; the 1st listed function is where the error occured.
$q -> exits adb
$h -> help
Gdb can zero in on the exact line of source code if supplied with -g and the source is available. Again, adb is rather limited.
Invoke adb as "adb myexe core"
$c
$c
$c -- stack trace; the 1st listed function is where the error occured.
$q -> exits adb
$h -> help
Gdb can zero in on the exact line of source code if supplied with -g and the source is available. Again, adb is rather limited.
If it ain't broke, I can fix that.
- Tags:
- gdb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 10:49 PM
11-11-2004 10:49 PM
Re: adb to debug core file
Hi,
I try with gdb, but everytime I run it, the follow message show me on prompt:
"warning: Unknown symbols for 'core'; use the 'symbol-file' command."
Where I wrong ??
The syntax that I use is the follow:
/opt/OV/contrib/OpC/gdb -core=core
Can U help me??
Thanks in advance,
Vinc.
I try with gdb, but everytime I run it, the follow message show me on prompt:
"warning: Unknown symbols for 'core'; use the 'symbol-file' command."
Where I wrong ??
The syntax that I use is the follow:
/opt/OV/contrib/OpC/gdb -core=core
Can U help me??
Thanks in advance,
Vinc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2004 04:17 AM
11-12-2004 04:17 AM
Re: adb to debug core file
cd to the directory containing the core file.
gdb /xxx/yyy/zzz/myexethatcrashed core
gdb will immediately do a stack trace with no command needed.
By the way, I suspect the gdb version supplied as part of NNM/VP/O is rather old so you might be well advised to get a newer version.
It's probably a good idea to play a little before doing the real thing. I would create a program that will crash and debug it:
The following should get you started:
#include
int badboy()
{
char s0[32],s1[4];
int i = 0;
for (i = 0; i < 1000000; ++i)
{
s0[i] = 'x';
s1[i - 100000] = s0[i + 100000];
}
return(0);
} /* badboy */
int main()
{
int cc = 0;
cc = badboy();
(void) printf("cc = %d\n",cc);
return(cc);
} /* main */
Compile it like this:
cc -g bad.c -o bad
next execute bad (it should immediate dump core)
gdb bad core
q (quit gdb)
(-g is not supported unless you have a development compiler (aCC or ANCI/C) but the Bundled compiler will simply ignore it. -g adds debugging data to the object.
gdb /xxx/yyy/zzz/myexethatcrashed core
gdb will immediately do a stack trace with no command needed.
By the way, I suspect the gdb version supplied as part of NNM/VP/O is rather old so you might be well advised to get a newer version.
It's probably a good idea to play a little before doing the real thing. I would create a program that will crash and debug it:
The following should get you started:
#include
int badboy()
{
char s0[32],s1[4];
int i = 0;
for (i = 0; i < 1000000; ++i)
{
s0[i] = 'x';
s1[i - 100000] = s0[i + 100000];
}
return(0);
} /* badboy */
int main()
{
int cc = 0;
cc = badboy();
(void) printf("cc = %d\n",cc);
return(cc);
} /* main */
Compile it like this:
cc -g bad.c -o bad
next execute bad (it should immediate dump core)
gdb bad core
q (quit gdb)
(-g is not supported unless you have a development compiler (aCC or ANCI/C) but the Bundled compiler will simply ignore it. -g adds debugging data to the object.
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP