[<prev] [next>] [day] [month] [year] [list]
Message-ID: <51985.166.70.238.45.1217831932.squirrel@webmail.wolfmountaingroup.com>
Date: Mon, 4 Aug 2008 00:38:52 -0600 (MDT)
From: jmerkey@...fmountaingroup.com
To: linux-kernel@...r.kernel.org
Subject: [PATCH 2.6.27-rc1 18/25] mdb: Merkey's Kernel Debugger 2.6.27-rc1
Netware style debugger for Linux written by Jeffrey Vernon Merkey
--- a/debug/mdb-proc.h 1969-12-31 17:00:00.000000000 -0700
+++ b/debug/mdb-proc.h 2008-08-03 16:15:00.000000000 -0600
@@ -0,0 +1,139 @@
+
+/***************************************************************************
+*
+* Copyright (c) 2008 Jeff V. Merkey All Rights Reserved.
+* 1058 East 50 South
+* Lindon, Utah 84042
+* jmerkey@...fmountaingroup.com
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of the GNU General Public License as published by the
+* Free Software Foundation, version 3.
+*
+* This program is distributed in the hope that it will be useful, but
+* WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* General Public License for more details.
+*
+* You are free to modify and re-distribute this program in accordance
+* with the terms specified in the GNU Public License. The copyright
+* contained in this code is required to be present in any derivative
+* works and you are required to provide the source code for this
+* program as part of any commercial or non-commercial distribution.
+* You are required to respect the rights of the Copyright holders
+* named within this code.
+*
+* jmerkey@...fmountaingroup.com is the official maintainer of
+* this code. You are encouraged to report any bugs, problems, fixes,
+* suggestions, and comments about this software.
+*
+* AUTHOR : Jeff V. Merkey
+* FILE : MDB-PROC.H
+* DESCRIP : Merkey's NetWare Debugger
+* DATE : April 8, 2008
+*
+***************************************************************************/
+
+#ifndef _MDB_PROC_H
+#define _MDB_PROC_H
+
+#define MAX_PROCESSORS NR_CPUS
+#define SYMBOL_DEBUG 0
+
+// mdb-base.c
+extern ULONG needs_proceed;
+extern ULONG general_toggle;
+extern ULONG line_info_toggle;
+extern ULONG control_toggle;
+extern ULONG segment_toggle;
+extern ULONG numeric_toggle;
+extern ULONG reason_toggle;
+
+extern ULONG MajorVersion;
+extern ULONG MinorVersion;
+extern ULONG BuildVersion;
+extern BYTE *IA32Flags[];
+extern BYTE *BreakDescription[];
+extern BYTE *BreakLengthDescription[];
+extern BYTE *ExceptionDescription[];
+extern NUMERIC_FRAME npx[MAX_PROCESSORS];
+extern StackFrame ReferenceFrame[MAX_PROCESSORS];
+extern volatile ULONG debuggerActive;
+extern volatile ULONG ProcessorHold[MAX_PROCESSORS];
+extern volatile ULONG ProcessorState[MAX_PROCESSORS];
+extern volatile ULONG ProcessorMode[MAX_PROCESSORS];
+
+// mdb-ia32.c
+extern volatile BYTE *lastDumpAddress;
+extern volatile BYTE *lastLinkAddress;
+extern volatile ULONG lastUnasmAddress;
+extern volatile ULONG displayLength;
+extern volatile ULONG lastCommand;
+extern volatile ULONG lastCommandEntry;
+extern volatile BYTE lastDebugCommand[100];
+extern volatile ULONG lastDisplayLength;
+extern volatile BYTE debugCommand[100];
+extern volatile ULONG nextUnasmAddress;
+extern volatile ULONG pic1Value;
+extern volatile ULONG pic2Value;
+extern volatile ULONG BreakReserved[4];
+extern volatile ULONG BreakPoints[4];
+extern volatile ULONG BreakType[4];
+extern volatile ULONG BreakLength[4];
+extern volatile ULONG BreakTemp[4];
+extern volatile ULONG BreakGo[4];
+extern volatile ULONG BreakProceed[4];
+extern volatile ULONG BreakMask[MAX_PROCESSORS];
+extern volatile StackFrame *CurrentFrame[MAX_PROCESSORS];
+extern volatile ULONG NestedInterrupts[MAX_PROCESSORS];
+extern volatile ULONG ConditionalBreakpoint[4];
+extern volatile BYTE BreakCondition[4][256];
+extern volatile StackFrame lastStackFrame;
+extern volatile ULONG lastCR0;
+extern volatile ULONG lastCR2;
+extern volatile ULONG lastCR4;
+extern volatile ULONG CurrentDR7;
+extern volatile ULONG CurrentDR6[MAX_PROCESSORS];
+extern volatile ULONG repeatCommand;
+extern volatile ULONG totalLines;
+extern volatile ULONG debuggerInitialized;
+
+extern ULONG disassemble(StackFrame *stackFrame, ULONG p, ULONG count,
+ ULONG use);
+extern void ClearDebuggerState(void);
+extern void displayMTRRRegisters(void);
+extern void DisplayGDT(BYTE *GDT_ADDRESS);
+extern void DisplayIDT(BYTE *IDT_ADDRESS);
+extern void SetDebugRegisters(void);
+extern void LoadDebugRegisters(void);
+extern void ClearTempBreakpoints(void);
+extern ULONG ValidBreakpoint(ULONG address);
+extern BYTE *dump(BYTE *p, ULONG count);
+extern BYTE *dumpWord(BYTE *p, ULONG count);
+extern BYTE *dumpDouble(BYTE *p, ULONG count);
+extern BYTE *dumpLinkedList(BYTE *p, ULONG count, ULONG offset);
+extern BYTE *dumpDoubleStack(StackFrame *stackFrame, BYTE *p, ULONG count);
+extern BYTE *dumpStack(StackFrame *stackFrame, BYTE *p, ULONG count);
+extern ULONG debugger_setup(ULONG processor, ULONG Exception, StackFrame
*stackFrame, BYTE *panicMsg);
+extern ULONG debugger_entry(ULONG Exception, StackFrame *stackFrame,
ULONG processor);
+extern ULONG debugger_command_entry(ULONG processor, ULONG Exception,
StackFrame *stackFrame);
+extern ULONG ConsoleDisplayBreakReason(StackFrame *stackFrame,
+ ULONG reason, ULONG processor,
+ ULONG lastCommand);
+extern ULONG EvaluateExpression(StackFrame *stackFrame, BYTE **p, ULONG
*type);
+extern ULONG EvaluateNumericExpression(StackFrame *stackFrame, BYTE **p,
+ ULONG *type);
+extern ULONG unassemble(StackFrame *stackFrame, ULONG ip, ULONG use,
+ ULONG *ret);
+extern void DisplayASCIITable(void);
+extern BYTE *UpcaseString(BYTE *);
+extern ULONG validate_address(ULONG addr);
+extern ULONG ScreenInputFromKeyboard(BYTE *buffer, ULONG Start, ULONG
Length);
+
+extern ULONG GetIP(StackFrame *);
+extern ULONG GetStackAddress(StackFrame *);
+extern ULONG GetStackSegment(StackFrame *);
+extern WORD read_memory(void *, void *, unsigned);
+
+#endif
+
By making a contribution to this project, I certify that
the contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file.
Jeffrey Vernon Merkey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists