- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: gdb/wdb crashes loading my program
Operating System - HP-UX
1752377
Members
6529
Online
108787
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
Discussions
Discussions
Forums
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
тАО12-13-2004 07:42 AM
тАО12-13-2004 07:42 AM
I have a problem with debugging that I would greatly appreciate any suggestions on. I'm using HP-UX 11.11 on PA-RISC, gcc 3.4.3, gdb 6.2.1, and wdb 5.0 (same behavior with gdb and wdb). (Thanks to H.Merijn's pages.) If I build a smallish test program (order of magnitude smaller, just the base framework code without the big app on top of it) everything works fine in the debugger. But for the full program (the "real" one), gdb/wdb crashes (segmentation fault) upon trying to load my program symbols -- before even running it. The program runs fine on its own outside the debugger.
The program executable seems large (250MB) which I imagine could be the issue (?) but I am not sure what I can do to shrink that. By contrast, the exe size of the same program built on Windows by VC++ or on Mac OS by CodeWarrior is under 15MB; GCC on Mac OS X also generates a 250MB executable, so perhaps size is not the problem. There is no practical way for me whittle down to a buildable subset in order probe for the limit.
If anyone has insight into what could cause gdb/wdb to crash loading my symbols, or what I can do to diagnose or remedy it, I'd appreciate the help!
Thanks,
Trygve
The program executable seems large (250MB) which I imagine could be the issue (?) but I am not sure what I can do to shrink that. By contrast, the exe size of the same program built on Windows by VC++ or on Mac OS by CodeWarrior is under 15MB; GCC on Mac OS X also generates a 250MB executable, so perhaps size is not the problem. There is no practical way for me whittle down to a buildable subset in order probe for the limit.
If anyone has insight into what could cause gdb/wdb to crash loading my symbols, or what I can do to diagnose or remedy it, I'd appreciate the help!
Thanks,
Trygve
Solved! Go to Solution.
- Tags:
- gdb
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-13-2004 07:51 AM
тАО12-13-2004 07:51 AM
Solution
Well, the most logical approach would be to try to use the debugger itself to do a stack trace on one of its own core files. That would at least give you a clue as to what's going on -- if the debugger lives through that. I don't use gcc or g++ on HP-UX but you might try increasing maxssiz, maxdsiz and possibly maxtsiz.
If it ain't broke, I can fix that.
- Tags:
- kernel parms
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-13-2004 12:14 PM
тАО12-13-2004 12:14 PM
Re: gdb/wdb crashes loading my program
Thank you so much for the info! That led me down the right path and I was able to get it working.
First, I ran sam (selecting kernel -> configurable parameters) and upped the values of maxssiz, maxtsiz, and maxdsiz to their max allowed values, and rebooted with the rebuilt kernel. The problem persisted, but with the new parameters gdb got further before core dumping, and the error message was better, stating that gdb was crashing either due to running out of memory or maxssiz stack space.
I checked the executables of both gdb and the application I'm debugging, and they're built with the 32-bit compiler. But it occurred to me that I should try upping the 64-bit values of the kernel parameters, too. So I went back into sam and set maxdsiz_64bit, maxtsiz_64bit, and maxssiz_64bit to match the 32-bit settings, and rebooted with a rebuilt kernel. Success! gdb loads my program and so far seems OK debugging it.
For reference, my hardware info and kernel parameters were/are:
/etc/dmesg says I have 1GB physical memory
/etc/swapinfo -t says I have about 2.7GB of swap
The original kernel parameters were:
maxdsiz 0x10000000 (32bit) and 0x40000000 (64bit)
maxtsiz 0x04000000 (32bit) and 0x40000000 (64bit)
maxssiz 0x00800000 (32bit) and 0x00800000 (64bit)
The new kernel parameters that work for me and are at or near the max values sam will allow are:
maxdsiz 0xC0000000
maxtsiz 0x40000000
maxssiz 0x17F00000
(same for 32 and 64 bit)
Thanks again,
Trygve
First, I ran sam (selecting kernel -> configurable parameters) and upped the values of maxssiz, maxtsiz, and maxdsiz to their max allowed values, and rebooted with the rebuilt kernel. The problem persisted, but with the new parameters gdb got further before core dumping, and the error message was better, stating that gdb was crashing either due to running out of memory or maxssiz stack space.
I checked the executables of both gdb and the application I'm debugging, and they're built with the 32-bit compiler. But it occurred to me that I should try upping the 64-bit values of the kernel parameters, too. So I went back into sam and set maxdsiz_64bit, maxtsiz_64bit, and maxssiz_64bit to match the 32-bit settings, and rebooted with a rebuilt kernel. Success! gdb loads my program and so far seems OK debugging it.
For reference, my hardware info and kernel parameters were/are:
/etc/dmesg says I have 1GB physical memory
/etc/swapinfo -t says I have about 2.7GB of swap
The original kernel parameters were:
maxdsiz 0x10000000 (32bit) and 0x40000000 (64bit)
maxtsiz 0x04000000 (32bit) and 0x40000000 (64bit)
maxssiz 0x00800000 (32bit) and 0x00800000 (64bit)
The new kernel parameters that work for me and are at or near the max values sam will allow are:
maxdsiz 0xC0000000
maxtsiz 0x40000000
maxssiz 0x17F00000
(same for 32 and 64 bit)
Thanks again,
Trygve
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP