- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- gdb errors attaching to a process
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
01-28-2014 09:31 AM
01-28-2014 09:31 AM
gdb errors attaching to a process
HP gurus:
I am having trouble attaching to a process in gdb. I have tried several
things to solve the problem, with no luck. I also searched through the
archives and found no past discussions about my problem. I am hoping
someone here can help.
I am running on a PA-RISC machine (a C3600 WS) using HP-UX 10.20.
The compiler I am using is g++ version2.7.2.2, and I am using gdb
version 4.16. I believe I compiled all the code correctly - I used the
"-g3 -O0 (that's -Ohhhh zero)" flags during my compile. The application
I am trying to test is three "levels" - an outer wrapper level, an
intermediate level, and a low-level kernel. I have tested the kernel
code in gdb with no problems. When I compiled everything and then
tried to attach to it, I get problems.
Assuming my Application program is named "foo" and its process
number is "1234", I have tried:
> gdb foo
(gdb) attach 1234
> gdb foo 1234
> gdb foo
(gdb) attach 1234 foo
> gdb
(gdb) attach 1234 foo
With the exception of the last example (which is even worse), I get
an error:
warning: reading register r3: I/O error
0x1307578 in _read_sys ()
If I do a stack backtrace, I get:
#0 0x1307578 in _read_sys ()
#1 0x12f6410 in _read ()
When you look at the stack backtrace, it "hangs" and I
have to do a <CTRL-C> to get back a gdb prompt. I can
do "directory" commands and set break points, but when
I do a "continue", nothing happens. I eventually have to
do a <CTRL-C> to get the gdb prompt back, and the stack
backtrace is the same as above (i.e.. nothing seems to be
running).
If I do a:
> gdb foo
(gdb) run
This seems to work fine - I can see the Application initializing
and interacting with the database. Once it's up and waiting
for some work to do, however, is when I want to attach to
it.
Just for grins, I wrote a small program outside our Application
environment and tried to attach to it. I did not get the error
mentioned above, but I did get "permission" problems. When
I did the attach, I got back "ptrace: permission denied". I did
some Google searches and understand this a little; however,
most of the solutions were Linux based. I could not equate
most of the answers to HP-UX 10.20. Anyway, I did this just
for fun, but I would like to make some progress on the problem
above.
Any ideas why I cannot seem to attach to a running process?
Thanks for the help.
Regards,
Jeff Kolodziej
- Tags:
- gdb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2014 09:07 PM - edited 01-28-2014 09:08 PM
01-28-2014 09:07 PM - edited 01-28-2014 09:08 PM
Re: gdb errors attaching to a process (10.20)
I think you are way out of luck, 10.20 isn't supported and very old.
And the gdb you're using? isn't HP's wdb.
You may want to try debugging this on a more recent, supported OS version, 11.31.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2014 12:23 PM
01-29-2014 12:23 PM
Re: gdb errors attaching to a process (10.20)
Thanks for the reply and the advice. OK, your reply is not
unexpected.
Unfortunately, I am constrained with the current system
we have. There is no realistic option to use newer
hardware/software/tools, so I will search for an
alternative solution.
I assigned kudos - thanks again for the input.