HPE GreenLake Administration
- Community Home
 - >
 - Servers and Operating Systems
 - >
 - Operating Systems
 - >
 - Operating System - HP-UX
 - >
 - Re: how to use gdb on HPUX 11.00
 
Operating System - HP-UX
        1840126
        Members
    
    
        3434
        Online
    
    
        110161
        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
	
		
			
            
                
            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
 
04-19-2006 11:43 AM
04-19-2006 11:43 AM
			
				
					
					
						Hi,
I just installed debugger tool. The files are shown as below:-
[sksonkar@bigguy:/var/adm/crash/shiv/WDB/WDB/opt/langtools/bin]$ll
total 12080
-r--r--r-- 1 bin bin 3184 Apr 8 23:15 faq
-r-xr-xr-x 1 bin bin 2164793 Apr 8 23:15 gdb32
-r-xr-xr-x 1 bin bin 2164207 Apr 8 23:15 gdb64
-r-xr-xr-x 1 bin bin 6334 Apr 8 23:15 vdb
-r-xr-xr-x 1 bin bin 1203155 Apr 8 23:15 vdbterm
-r-xr-xr-x 1 bin bin 639270 Apr 8 23:15 vdbvim
I am seeing gdb32 and gdb64 above. Are these correct ?
I want to debug apache process. I guess i need to generate first apache core file..right ??
Can someone suggest how use these tool along with syntax?
Appreciate your help.
PS: Please ignore the installed directory structure as i found space there only.
It is a dev box.
Thanks,
Shiv
					
				
			
			
				
			
			
				
	
			
				
		
			
			
			
			
			
			
		
		
		
	
	
	
I just installed debugger tool. The files are shown as below:-
[sksonkar@bigguy:/var/adm/crash/shiv/WDB/WDB/opt/langtools/bin]$ll
total 12080
-r--r--r-- 1 bin bin 3184 Apr 8 23:15 faq
-r-xr-xr-x 1 bin bin 2164793 Apr 8 23:15 gdb32
-r-xr-xr-x 1 bin bin 2164207 Apr 8 23:15 gdb64
-r-xr-xr-x 1 bin bin 6334 Apr 8 23:15 vdb
-r-xr-xr-x 1 bin bin 1203155 Apr 8 23:15 vdbterm
-r-xr-xr-x 1 bin bin 639270 Apr 8 23:15 vdbvim
I am seeing gdb32 and gdb64 above. Are these correct ?
I want to debug apache process. I guess i need to generate first apache core file..right ??
Can someone suggest how use these tool along with syntax?
Appreciate your help.
PS: Please ignore the installed directory structure as i found space there only.
It is a dev box.
Thanks,
Shiv
Solved! Go to Solution.
		3 REPLIES 3
	
	            
            
		
		
			
            
                - Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
04-19-2006 11:49 AM
04-19-2006 11:49 AM
Solution
			
				
					
					
						gdb will only be partially useful unless you actually compile the source with the -g option and turn off the optimizer. This includes debugger infomation in the object files so that when a stack trace is done, you see not only the functions (which are available w/o -g) but also the exact line no in the source file where the problem occurs. You are correct in that you must let the application generate a corefile. You then launcch gdb executable core and normally a stack trace will be done automatically. Now having explained all this, if you have to ask then a stack trace is likely not to do you much good.
					
				
			
			
				
		
		
	
	
	
	If it ain't broke, I can fix that.
			
			
				
			
			
			
			
			
			
		- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
04-20-2006 12:11 AM
04-20-2006 12:11 AM
			
				
					
						
							Re: how to use gdb on HPUX 11.00
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Shiv,
I think the 1st link has info that you asked for. Honestly I have no idea, just did a google and posted to you.
You can mark "0" if this is of no use.
http://httpd.apache.org/dev/debugging.html
http://www.cs.cmu.edu/~gilpin/tutorial/
Chan
		
		
	
	
	
I think the 1st link has info that you asked for. Honestly I have no idea, just did a google and posted to you.
You can mark "0" if this is of no use.
http://httpd.apache.org/dev/debugging.html
http://www.cs.cmu.edu/~gilpin/tutorial/
Chan
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
04-20-2006 01:13 AM
04-20-2006 01:13 AM
			
				
					
						
							Re: how to use gdb on HPUX 11.00
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Hi Shiv, 
Most likely you have installed GDB for 11.11 in 11.0. Anyways, that doesn't matter. You can use gdb32 to debug a 32bit app. First, find out which httpd you want to debug. (Use file option to find 32 or 64 bit). If you have a core file, you can start straight away.
# gdb httpd core
If you know the PID of httpd, you can attach GDB to running process,
gdb>attach 
Some useful links,
http://users.actcom.co.il/~choo/lupg/tutorials/debugging/debugging-with-gdb.html
http://www.delorie.com/gnu/docs/gdb/gdb_toc.html
-Arun
 
					
				
			
			
				
		
		
	
	
	
Most likely you have installed GDB for 11.11 in 11.0. Anyways, that doesn't matter. You can use gdb32 to debug a 32bit app. First, find out which httpd you want to debug. (Use file option to find 32 or 64 bit). If you have a core file, you can start straight away.
# gdb httpd core
If you know the PID of httpd, you can attach GDB to running process,
gdb>attach
Some useful links,
http://users.actcom.co.il/~choo/lupg/tutorials/debugging/debugging-with-gdb.html
http://www.delorie.com/gnu/docs/gdb/gdb_toc.html
-Arun
	"A ship in the harbor is safe, but that is not what ships are built for"
			
			
				
			
			
			
			
			
			
		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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP