🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Eric Ameres Tue, 26 Jan 1993 02:15
nm.h not included in inftarg.c
#599
Author: Eric Ameres
Date: Tue, 26 Jan 1993 02:15
40 lines
1678 bytes
After finding that We couldn't attach to running processes we found
the following code was being called in inftarg.c:

#ifndef ATTACH_DETACH
  error ("Can't attach to a process on this machine.");
#else
  pid = atoi (args);

  if (pid == getpid())          /* Trying to masturbate? */
    error ("I refuse to debug myself!");

  if (from_tty)
    {
      exec_file = (char *) get_exec_file (0);

      if (exec_file)
        printf ("Attaching program `%s', pid %d\n", exec_file, pid);
      else
        printf ("Attaching pid %d\n", pid);

      fflush (stdout);
    }

  attach (pid);
  inferior_pid = pid;
  push_target (&child_ops);
#endif  /* ATTACH_DETACH */

The strange part is that ATTACH_DETACH is defined in nm.h.  By adding
#include "nm.h", attaching works just fine.  By the way we're using
this on SparcStations using SunOs 4.1.1.

Anybody encounter the same thing?

Eric.
-- 
----------------------------------------------------------------------
Eric Ameres,  Software Engineer                 ameres@cat.rpi.edu
New York State Center for Advanced Technology in Automation & Robotics
Rensselaer Polytechnic Institute - CII 8313, Troy, NY 12180-3590
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