🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #599

nm.h not included in inftarg.c

#599
From: 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
Technical Details
Message-ID: <54n36hr@rpi.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ithaca.cat.rpi.edu!ameres

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ithaca.cat.rpi.edu!ameres
From: ameres@ithaca.cat.rpi.edu (Eric Ameres)
Newsgroups: gnu.gdb.bug
Subject: nm.h not included in inftarg.c
Date: 25 Jan 1993 21:15:30 -0500
Organization: Rensselaer Polytechnic Institute, Troy NY
Lines: 41
Sender: daemon@cis.ohio-state.edu
Approved: bug-gdb@prep.ai.mit.edu
Distribution: gnu
Message-ID: <54n36hr@rpi.edu>