aboutsummaryrefslogtreecommitdiff
path: root/gdb/nlm/prelude.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1994-03-25 01:38:12 +0000
committerStu Grossman <grossman@cygnus>1994-03-25 01:38:12 +0000
commit27847c6f99c457a02816c2082fa91e0a8c408d00 (patch)
tree202f093abaad0f3caf5ac879f63675ce10aa8b11 /gdb/nlm/prelude.c
parent193c5f93a17206ea7e83b7ae476e1a997e1ff108 (diff)
downloadgdb-27847c6f99c457a02816c2082fa91e0a8c408d00.zip
gdb-27847c6f99c457a02816c2082fa91e0a8c408d00.tar.gz
gdb-27847c6f99c457a02816c2082fa91e0a8c408d00.tar.bz2
Netware debugger stub NLM.
Diffstat (limited to 'gdb/nlm/prelude.c')
-rw-r--r--gdb/nlm/prelude.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/gdb/nlm/prelude.c b/gdb/nlm/prelude.c
new file mode 100644
index 0000000..c2e6857
--- /dev/null
+++ b/gdb/nlm/prelude.c
@@ -0,0 +1,62 @@
+/*===========================================================================
+= Novell Standard C Library for NetWare Loadable Modules
+=
+= Unpublished Copyright (C) 1993 by Novell, Inc. All rights reserved.
+=
+= No part of this file may be duplicated, revised, translated, localized or
+= modified in any manner or compiled, linked or uploaded or downloaded to or
+= from any computer system without the prior written consent of Novell, Inc.
+==============================================================================
+= The object produced by compiling this file is for use by the client of this
+= library and is not linked in; Prelude.Obj is therefore one of the files to
+= be distributed with CLib.NLM and its headers.
+==============================================================================
+*/
+#include <nwpre.h>
+#include "libhooks.h"
+
+static int NLMID;
+
+
+void _Stop( void )
+{
+ _TerminateNLM(NLMID, NULL, TERMINATE_BY_UNLOAD);
+}
+
+int _cstart_( void )
+{
+ return _SetupArgv(main);
+}
+
+int _Prelude
+(
+ int NLMHandle,
+ int initErrorScreenID,
+ char *commandLine,
+ char *loadDirectoryPath,
+ int uninitializedDataLength,
+ int NLMFileHandle,
+ int (*readRoutineP)(),
+ int customDataOffset,
+ int customDataSize
+)
+{
+ int rc;
+
+ rc = _StartNLM(NLMHandle,
+ initErrorScreenID,
+ commandLine,
+ loadDirectoryPath,
+ uninitializedDataLength,
+ NLMFileHandle,
+ readRoutineP,
+ customDataOffset,
+ customDataSize,
+ &NLMID,
+ _cstart_);
+
+ if (!rc)
+ rc = _NWRegisterNLMLibraryUser(NLMID, _GetCLibNLMLibHandle());
+
+ return rc;
+}