nodebug.c

来自「gdb that s ported for PXA270 processor. 」· C语言 代码 · 共 82 行

C
82
字号
#include <stdlib.h>/* Test that things still (sort of) work when compiled without -g.  */int dataglobal = 3;			/* Should go in global data */static int datalocal = 4;		/* Should go in local data */int bssglobal;				/* Should go in global bss */static int bsslocal;			/* Should go in local bss */#ifdef PROTOTYPESintinner (int x)#elseintinner (x)     int x;#endif{  return x + dataglobal + datalocal + bssglobal + bsslocal;}#ifdef PROTOTYPESstatic shortmiddle (int x)#elsestatic shortmiddle (x)     int x;#endif{  return 2 * inner (x);}#ifdef PROTOTYPESshorttop (int x)#elseshorttop (x)     int x;#endif{  return 2 * middle (x);}#ifdef PROTOTYPESintmain (int argc, char **argv)#elseint main (argc, argv)     int argc;     char **argv;#endif{#ifdef usestubs  set_debug_traps();  breakpoint();#endif  return top (argc);}int *x;#ifdef PROTOTYPESint array_index (char *arr, int i)#elseintarray_index (arr, i)     char *arr;     int i;#endif{  /* The basic concept is just "return arr[i];".  But call malloc so that gdb     will be able to call functions.  */  char retval;  x = (int *) malloc (sizeof (int));  *x = i;  retval = arr[*x];  free (x);  return retval;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?