mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: jmerkey@wolfmountaingroup.com
To: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.26 18/25] mdb: Merkey's Kernel Debugger
Date: Sun, 3 Aug 2008 20:13:42 -0600 (MDT)	[thread overview]
Message-ID: <57565.166.70.238.45.1217816022.squirrel@webmail.wolfmountaingroup.com> (raw)
In-Reply-To: 

Netware Style Debugger for Linux written by Jeffrey Vernon Merkey

--- linux-2.6.26/debug/mdb-proc.h	1969-12-31 17:00:00.000000000 -0700 +++
linux-2.6.26-mdb/debug/mdb-proc.h	2008-08-03 12:49:01.000000000 -0600 @@
-0,0 +1,139 @@
+
+/***************************************************************************
+*
+*   Copyright (c) 2008 Jeff V. Merkey  All Rights Reserved.
+*   1058 East 50 South
+*   Lindon, Utah 84042
+*   jmerkey@wolfmountaingroup.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@wolfmountaingroup.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






                 reply	other threads:[~2008-08-04  2:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57565.166.70.238.45.1217816022.squirrel@webmail.wolfmountaingroup.com \
    --to=jmerkey@wolfmountaingroup.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®