🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by David Newton Tue, 06 Feb 1990 17:49
attach/detach supported on HPUX 6.5
#827
Author: David Newton
Date: Tue, 06 Feb 1990 17:49
48 lines
2022 bytes
Gdb 3.3 as distributed does not support the attach command to an executing
process. The following code (copied from sun3-dep.c with slight renaming of
ptrace arguments to match the HP include file) inserted into hp9k320-dep.c
after the code for function "kill-inferior" provides a functioning attach
command.

 | #ifdef ATTACH_DETACH
 | 
 | extern int attach_flag ;
 | 
 | /* Start debugging the process whose number is PID.  */
 | 
 | attach (pid)
 |      int pid;
 | {
 |   errno = 0;
 |   ptrace (PT_ATTACH, pid, 0, 0);
 |   if (errno)
 |     perror_with_name ("ptrace");
 |   attach_flag = 1;
 |   return pid;
 | }
 | 
 | /* Stop debugging the process whose number is PID
 |    and continue it with signal number SIGNAL.
 |    SIGNAL = 0 means just continue it.  */
 | 
 | void
 | detach (signal)
 |      int signal;
 | {
 |   errno = 0;
 |   ptrace (PT_DETACH, inferior_pid, 1, signal);
 |   if (errno)
 |     perror_with_name ("ptrace");
 |   attach_flag = 0;
 | }
 | #endif /* ATTACH_DETACH */


+---------------------------------+----------------------------------+
| David Newton                    | HPDESK: David Newton/HP1400/B1   |
| Hewlett Packard Ltd             | ARPA:   daven@hpsqf.sqf.hp.com   |
| Queensferry Telecomms Division  |                                  |
| South Queensferry               | UUCP:   ..!hplabs!hpsqf!daven    |
| West Lothian                    | JANET:  daven@hpqtdla.hp.co.uk   |
| Scotland EH30 9TG.              | PHONE:  +44-31-331-7234          |
+---------------------------------+----------------------------------+
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads