🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #866

gdb on MIPS (non-DECstation)

#866
From: George Hartzell
Date: Sun, 04 Mar 1990 01:15
38 lines
1688 bytes
After applying Per Bothner's mips patches to the gdb3.5 sources, the
following "trivial" fix to munch will produce a working (so far,
anyway.  I haven't tried much) version of gdb on my MIPS M-2000 in the
BSD environment.  The problem is that the default behavior for nm is
system V, so we need to add the -B arguement to force BSD behavior.

Maybe MIPS could make a /bsd43/bin/nm that defaulted to the BSD
behaviour!!! 

Change:
    nm -p $* | egrep 'T *_?_initialize_' | \
to:
    nm -B -p $* | egrep 'T *_?_initialize_' | \

Here is the complete script:
#! /bin/sh

# create an initialization procedure from a list of .o files

echo '/* Do not modify this file.  It is created automatically by "munch". */'
echo 'void initialize_all_files () {'

if test "$1" = "-DSYSV" ; then
    shift;
    nm $* | egrep '^(.*[^a-zA-Z_]_|_)initialize_' | \
	sed -e 's/^.*\(_initialize_[a-zA-Z0-9_]*\)[^a-zA-Z0-9_].*$/   \1 ();/'
else
    nm -B -p $* | egrep 'T *_?_initialize_' | \
	sed -e 's/^.*T *_*\(.*\)/    _\1 ();/'
fi

echo '}'



George Hartzell			                  (303) 492-4535
 MCD Biology, University of Colorado-Boulder, Boulder, CO 80309
hartzell@Boulder.Colorado.EDU           ..!ncar!boulder!hartzell
Technical Details
Message-ID: <17717@boulder.Colorado.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!boulder!hartzell

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!boulder!hartzell
From: hartzell@boulder.colorado.edu (George Hartzell)
Newsgroups: gnu.gdb.bug,comp.sys.mips
Subject: gdb on MIPS (non-DECstation)
Message-ID: <17717@boulder.Colorado.EDU>
Date: 4 Mar 90 01:15:56 GMT
Sender: news@boulder.Colorado.EDU
Reply-To: hartzell@boulder.colorado.edu (George Hartzell)
Organization: University of Colorado, Boulder
Lines: 38