kgdb.h revision 1.1
11.1Ssakamoto/* 21.1Ssakamoto * Copyright (C) 1995, 1996 Wolfgang Solfrank. 31.1Ssakamoto * Copyright (C) 1995, 1996 TooLs GmbH. 41.1Ssakamoto * All rights reserved. 51.1Ssakamoto * 61.1Ssakamoto * Redistribution and use in source and binary forms, with or without 71.1Ssakamoto * modification, are permitted provided that the following conditions 81.1Ssakamoto * are met: 91.1Ssakamoto * 1. Redistributions of source code must retain the above copyright 101.1Ssakamoto * notice, this list of conditions and the following disclaimer. 111.1Ssakamoto * 2. Redistributions in binary form must reproduce the above copyright 121.1Ssakamoto * notice, this list of conditions and the following disclaimer in the 131.1Ssakamoto * documentation and/or other materials provided with the distribution. 141.1Ssakamoto * 3. All advertising materials mentioning features or use of this software 151.1Ssakamoto * must display the following acknowledgement: 161.1Ssakamoto * This product includes software developed by TooLs GmbH. 171.1Ssakamoto * 4. The name of TooLs GmbH may not be used to endorse or promote products 181.1Ssakamoto * derived from this software without specific prior written permission. 191.1Ssakamoto * 201.1Ssakamoto * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 211.1Ssakamoto * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 221.1Ssakamoto * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 231.1Ssakamoto * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 241.1Ssakamoto * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 251.1Ssakamoto * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 261.1Ssakamoto * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 271.1Ssakamoto * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 281.1Ssakamoto * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 291.1Ssakamoto * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 301.1Ssakamoto */ 311.1Ssakamoto/* register array */ 321.1Ssakamoto#define FIX 0 331.1Ssakamoto#define LR 32 341.1Ssakamoto#define CR 33 351.1Ssakamoto#define CTR 34 361.1Ssakamoto#define XER 35 371.1Ssakamoto#define PC 36 381.1Ssakamoto#define MSR 37 391.1Ssakamoto#define NREG 38 401.1Ssakamoto 411.1Ssakamotoextern int kgdbregs[NREG]; 421.1Ssakamoto 431.1Ssakamotoextern char kgdbstep; 441.1Ssakamoto 451.1Ssakamoto/* Doesn't handle overlapping regions */ 461.1Ssakamoto__inline extern void 471.1Ssakamotokgdbcopy(s,d,n) 481.1Ssakamoto void *s, *d; 491.1Ssakamoto int n; 501.1Ssakamoto{ 511.1Ssakamoto char *sp = s, *dp = d; 521.1Ssakamoto 531.1Ssakamoto while (--n >= 0) 541.1Ssakamoto *dp++ = *sp++; 551.1Ssakamoto} 561.1Ssakamoto 571.1Ssakamoto__inline extern void 581.1Ssakamotokgdbzero(d,n) 591.1Ssakamoto void *d; 601.1Ssakamoto int n; 611.1Ssakamoto{ 621.1Ssakamoto char *dp = d; 631.1Ssakamoto 641.1Ssakamoto while (--n >= 0) 651.1Ssakamoto *dp++ = 0; 661.1Ssakamoto} 671.1Ssakamoto 681.1Ssakamoto__inline extern int 691.1Ssakamotokgdbcmp(s,d,n) 701.1Ssakamoto void *s, *d; 711.1Ssakamoto{ 721.1Ssakamoto char *sp = s, *dp = d; 731.1Ssakamoto 741.1Ssakamoto while (--n >= 0) 751.1Ssakamoto if (*sp++ != *dp++) 761.1Ssakamoto return *--dp - *--sp; 771.1Ssakamoto return 0; 781.1Ssakamoto} 79