Article View: net.bugs.2bsd
Article #209Re: adb under networking 2.9 kernels
From: ps
Date: Sun, 17 Feb 1985 20:07
Date: Sun, 17 Feb 1985 20:07
159 lines
4842 bytes
4842 bytes
This set of modifications seem to make adb work fairly well for me. I
don't use adb very much except for the occassional debugging session,
and not much at all on kernel dumps anymore. (I have a version of
crash that is much better and easier to use.)
*** defs.h.1 Sun Nov 4 13:09:59 1984
--- defs.h Sun Nov 4 13:34:03 1984
***************
*** 109,114
* If it doesn't correspond to reality, use pstat -u on a core file to get uar0,
* subtract 0140000, and divide by 2 (sizeof int).
*/
#define UAR0 (&corhdr[509]) /* default address of r0 (u.u_ar0) */
#define KR0 2 /* location of r0 in kernel dump */
--- 109,116 -----
* If it doesn't correspond to reality, use pstat -u on a core file to get uar0,
* subtract 0140000, and divide by 2 (sizeof int).
*/
+ #define UAR0 (&corhdr[ctob(USIZE)/sizeof(POS) - 3]) /* default address of r0 (u.u_ar0) */
+ #ifdef old_and_notused_anymore
#define UAR0 (&corhdr[509]) /* default address of r0 (u.u_ar0) */
#endif
***************
*** 110,115
* subtract 0140000, and divide by 2 (sizeof int).
*/
#define UAR0 (&corhdr[509]) /* default address of r0 (u.u_ar0) */
#define KR0 2 /* location of r0 in kernel dump */
#define KR1 3
--- 112,118 -----
#define UAR0 (&corhdr[ctob(USIZE)/sizeof(POS) - 3]) /* default address of r0 (u.u_ar0) */
#ifdef old_and_notused_anymore
#define UAR0 (&corhdr[509]) /* default address of r0 (u.u_ar0) */
+ #endif
#define KR0 2 /* location of r0 in kernel dump */
#define KR1 3
*** pcs.c.1 Sun Nov 4 13:20:13 1984
--- pcs.c Sun Nov 4 13:18:20 1984
***************
*** 19,25
CHAR *lp;
CHAR lastc;
! POS corhdr[512];
POS *endhdr;
MAP txtmap;
--- 19,25 -----
CHAR *lp;
CHAR lastc;
! POS corhdr[ctob(USIZE)/sizeof(POS)]; /* was just 512 */
POS *endhdr;
MAP txtmap;
*** setup.c.1 Sun Nov 4 13:24:52 1984
--- setup.c Tue Nov 6 10:04:50 1984
***************
*** 36,42
long tell();
INT argcount;
INT signo;
! POS corhdr[512];
POS *uar0 = UAR0;
STRING symfil "a.out";
--- 36,42 -----
long tell();
INT argcount;
INT signo;
! POS corhdr[ctob(USIZE)/sizeof(POS)]; /* was just 512 */
POS *uar0 = UAR0;
STRING symfil "a.out";
***************
*** 109,115
txtmap.bo = round(txtsiz, TXTRNDSIZ);
txtmap.eo = 0;
txtmap.fo = 0;
! FOR ovly = 0; ovly < 7; ovly++
DO ovloff[ovly] = ovlsiz + txtsiz
+TXTHDRSIZ+OVLHDRSIZ;
ovlsiz += ovlseg.ov[ovly];
--- 109,115 -----
txtmap.bo = round(txtsiz, TXTRNDSIZ);
txtmap.eo = 0;
txtmap.fo = 0;
! FOR ovly = 0; ovly < NOVL; ovly++
DO ovloff[ovly] = ovlsiz + txtsiz
+TXTHDRSIZ+OVLHDRSIZ;
ovlsiz += ovlseg.ov[ovly];
***************
*** 173,179
datmap.b2 = maxstor-stksiz;
datmap.e2 = maxstor;
ELSE datsiz = round(datsiz+bss,64L);
! stksiz = 02000L;
datmap.f1 = 0;
datmap.b2 = 0140000L;
datmap.e2 = 0142000L;
--- 173,179 -----
datmap.b2 = maxstor-stksiz;
datmap.e2 = maxstor;
ELSE datsiz = round(datsiz+bss,64L);
! stksiz = (long)(ctob(USIZE));
datmap.f1 = 0;
datmap.b2 = 0140000L;
datmap.e2 = 0140000L + stksiz;
***************
*** 176,182
stksiz = 02000L;
datmap.f1 = 0;
datmap.b2 = 0140000L;
! datmap.e2 = 0142000L;
FI
switch (magic)
{
--- 176,182 -----
stksiz = (long)(ctob(USIZE));
datmap.f1 = 0;
datmap.b2 = 0140000L;
! datmap.e2 = 0140000L + stksiz;
FI
switch (magic)
{
***************
*** 239,245
else if (magic) {
register POS *ar0;
ar0 = (POS *)(((U *)corhdr)->u_ar0);
! if ((ar0>(POS *)0140000) & (ar0<(POS *)0142000)
&& !(ar0&01))
uar0 = ar0 - 0140000 + (unsigned)corhdr;
if (overlay) {
--- 239,245 -----
else if (magic) {
register POS *ar0;
ar0 = (POS *)(((U *)corhdr)->u_ar0);
! if ((ar0>(POS *)0140000) & (ar0<(POS *)(0140000+ctob(USIZE)))
&& !(ar0&01))
uar0 = ar0 - 0140000 + (unsigned)corhdr;
if (overlay) {
Technical Details
Message-ID:
<26700001@uok.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!inuxc!pur-ee!uiucdcs!uok!psReferences:
<115@tardis.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.6.2.17 $; site uok.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!inuxc!pur-ee!uiucdcs!uok!ps From: ps@uok.UUCP Newsgroups: net.bugs.2bsd Subject: Re: adb under networking 2.9 kernels Message-ID: <26700001@uok.UUCP> Date: Sun, 17-Feb-85 15:07:00 EST Article-I.D.: uok.26700001 Posted: Sun Feb 17 15:07:00 1985 Date-Received: Fri, 22-Feb-85 21:02:18 EST References: <115@tardis.UUCP> Lines: 159 Nf-ID: #R:tardis:-11500:uok:26700001:000:4081 Nf-From: uok!ps Feb 17 14:07:00 1985