Go to the first, previous, next, last section, table of contents.


Native Debugging

Native µð¹ö±ë

Several files control GDB's configuration for native support:

¸î¸î ÆÄÀϵéÀº native Áö¿øÀ» À§ÇØ GDB ¼³Á¤»çÇ×µéÀ» Á¦¾îÇÑ´Ù:

`gdb/config/arch/xyz.mh'
Specifies Makefile fragments needed when hosting or native on machine xyz. In particular, this lists the required native-dependent object files, by defining `NATDEPFILES=...'. Also specifies the header file which describes native support on xyz, by defining `NAT_FILE= nm-xyz.h'. You can also define `NAT_CFLAGS', `NAT_ADD_FILES', `NAT_CLIBS', `NAT_CDEPS', etc.; see `Makefile.in'.

¸Ó½Å xyzÀÇ È£½ºÆ®³ª native¶§ ÇÊ¿äÇÑ Makefile fragment¸¦ ¸»ÇÑ´Ù. Ưº°È÷, ÀÌ ¸®½ºÆ®´Â `NATDEPFILES=...'¸¦ Á¤ÀÇÇÏ¿© native-dependent °´Ã¼ ÆÄÀÏÀ» ¿ä±¸ÇÑ´Ù. ¶ÇÇÑ `NAT_FILE= nm-xyz.h'À» Á¤ÀÇÇÏ¿© xyzÀÇ natvie Áö¿øÀ» ±â¼úÇÏ´Â Çì´õ ÆÄÀÏÀ» ¸»ÇÑ´Ù. ¿©·¯ºÐÀº ¶ÇÇÑ `NAT_CFLAGS', `NAT_ADD_FILES', `NAT_CLIBS', `NAT_CDEPS', µîÀ» Á¤ÀÇÇÑ´Ù.; `Makefile.in'À» ÂüÁ¶Çضó.

`gdb/config/arch/nm-xyz.h'
(`nm.h' is a link to this file, created by configure). Contains C macro definitions describing the native system environment, such as child process control and core file support.

(`nm.h'´Â ÀÌ ÆÄÀÏ¿¡ ´ëÇÑ ¸µÅ©À̸ç configureÀÌ ¸»ÇÑ´Ù.) ÀÚ½Ä ÇÁ·Î¼¼½º Áö¿ø°ú ÄÚ¾îÆÄÀÏ Áö¿ø °°Àº native system ȯ°æÀ» ±â¼úÇÏ´Â C ¸ÅÅ©·Î Á¤ÀǸ¦ Æ÷ÇÔÇÑ´Ù.

`gdb/xyz-nat.c'
Contains any miscellaneous C code required for this native support of this machine. On some machines it doesn't exist at all.

ÀÌ ¸Ó½ÅÀÇ native Áö¿øÀ» ¿ä±¸ÇÏ´Â ±âŸ C Äڵ带 Æ÷ÇÔÇÑ´Ù. ¸î¸î ¸Ó½Å¿¡¼­, Ç×»ó Á¸ÀçÇϴ°ÍÀº ¾Æ´Ï´Ù.

There are some "generic" versions of routines that can be used by various systems. These can be customized in various ways by macros defined in your `nm-xyz.h' file. If these routines work for the xyz host, you can just include the generic file's name (with `.o', not `.c') in NATDEPFILES.

¿©±â¿¡´Â ¿©·¯ ½Ã½ºÅÛ¿¡ »ç¿ëµÉ¼ö ÀÖ´Â ÀϹÝÀûÀÎ ¹öÀüÀÇ ·çƾµéÀÌ ÀÖ´Ù. À̰͵éÀº `nm-xyz.h' ÆÄÀÏ¿¡ Á¤ÀÇµÈ ¸ÅÅ©·Î¿¡ ÀÇÇØ ´Ù¾çÇÑ ¹æ¹ýÀ¸·Î Ä¿½ºÅ͸¶ÀÌ¡ µÉ¼ö ÀÖ´Ù. ¸¸ÀÏ ÀÌµé ·çƾµéÀÌ xyz È£½ºÆ®¿¡¼­ ÀÛµ¿µÈ´Ù¸é, ¿©·¯ºÐÀº NATDEPFILES³» ÀϹÝÀûÀÎ ÆÄÀÏ À̸§(`.o'´Â °°ÀÌ, `.c'´Â ¾Æ´Ï´Ù.)À» Æ÷ÇÔÇÒ¼ö ÀÖ´Ù.

Otherwise, if your machine needs custom support routines, you will need to write routines that perform the same functions as the generic file. Put them into `xyz-nat.c', and put `xyz-nat.o' into NATDEPFILES.

±×·¸Áö ¾Ê°í, ¸¸ÀÏ ¸Ó½ÅÀÌ custom Áö¿ø ·ÎƾÀ» ÇÊ¿ä·Î ÇÑ´Ù¸é, ¿©·¯ºÐÀº ÀϹÝÀûÀÎ ÆÄÀÏó·³ °°Àº ÇÔ¼ö¸¦ ¼öÇàÇÏ´Â ·çƾÀ» ¾µ ÇÊ¿ä°¡ ÀÖ´Ù. ±×°ÍµéÀ» `xyz-nat.c'¿¡ ³õ°í, `xyz-nat.o'À» NATDEPFILES·Î ³õ¾Æ¶ó.

`inftarg.c'
This contains the target_ops vector that supports Unix child processes on systems which use ptrace and wait to control the child.

ÀÌ ÆÄÀÏÀº ptrace¸¦ »ç¿ëÇÏ°í ÀÚ½ÄÀ» Á¦¾îÇÏ±æ ±â´Ù¸®´Â ½Ã½ºÅÛ³» Unix ÀÚ½Ä ÇÁ·Î¼¼½º¸¦ Áö¿øÇÏ´Â target_ops vectorÀ» Æ÷ÇÔÇÑ´Ù.

`procfs.c'
This contains the target_ops vector that supports Unix child processes on systems which use /proc to control the child.

ÀÌ ÆÄÀÏÀº ÀÚ½Ä Á¦¾î¸¦ À§ÇØ /procÀ» »ç¿ëÇÏ´Â ½Ã½ºÅÛ³» Unix ÀÚ½Ä ÇÁ·Î¼¼½º¸¦ Áö¿øÇÏ´Â target_ops vector¸¦ Æ÷ÇÔÇÑ´Ù.

`fork-child.c'
This does the low-level grunge that uses Unix system calls to do a "fork and exec" to start up a child process.

ÀÌ ÆÄÀÏÀº ÀÚ½Ä ÇÁ·Î¼¼½º¸¦ ½ÃÀÛÇϱâ Çϱâ À§ÇØ "fork ±×¸®°í exec" Unix ½Ã½ºÅÛ È£ÃâÀ» »ç¿ëÇÏ´Â ÇÏÀ§-·¹º§ ÀÛ¾÷À» ÇÑ´Ù.

`infptrace.c'
This is the low level interface to inferior processes for systems using the Unix ptrace call in a vanilla way.

ÀÌ ÆÄÀÏÀº À¯´Ð½º ptrace È£ÃâÀ» »ç¿ëÇÏ´Â ½Ã½ºÅÛÀ» À§ÇØ ³»ºÎ ÇÁ·Î¼¼½º¿¡ ´ëÇÑ ÇÏÀ§ ·¹º§ ÀÎÅÍÆäÀ̽ºÀÌ´Ù.

Native core file Support

Native ÄÚ¾î ÆÄÀÏ Áö¿ø

`core-aout.c::fetch_core_registers()'
Support for reading registers out of a core file. This routine calls register_addr(), see below. Now that BFD is used to read core files, virtually all machines should use core-aout.c, and should just provide fetch_core_registers in xyz-nat.c (or REGISTER_U_ADDR in nm-xyz.h).

ÄÚ¾îÆÄÀÏ¿¡¼­ ·¹Áö½ºÅÍ Àб⸦ Áö¿øÇÑ´Ù. ÀÌ·çƾÀº ¾Æ·¡ º¸ÀÌ´Â register_addr()¸¦ È£ÃâÇÑ´Ù. BFD´Â ÄÚ¾î ÆÄÀÏÀ» Àϱâ À§ÇØ »ç¿ëµÇ¸ç, ½ÇÁ¦·Î ¸ðµç ¸Ó½ÅÀº core-aout.cÀ» »ç¿ëÇØ¾ß Çϸç xyz-nat.c (¶Ç´Â nm-xyz.h³» REGISTER_U_ADDR)³» fetch_core_registersÀ» Á¦°øÇØ¾ß ÇÑ´Ù.

`core-aout.c::register_addr()'
If your nm-xyz.h file defines the macro REGISTER_U_ADDR(addr, blockend, regno), it should be defined to set addr to the offset within the `user' struct of GDB register number regno. blockend is the offset within the "upage" of u.u_ar0. If REGISTER_U_ADDR is defined, `core-aout.c' will define the register_addr() function and use the macro in it. If you do not define REGISTER_U_ADDR, but you are using the standard fetch_core_registers(), you will need to define your own version of register_addr(), put it into your xyz-nat.c file, and be sure xyz-nat.o is in the NATDEPFILES list. If you have your own fetch_core_registers(), you may not need a separate register_addr(). Many custom fetch_core_registers() implementations simply locate the registers themselves.

¸¸ÀÏ nm-xyz.h ÆÄÀÏÀÌ ¸ÅÅ©·Î REGISTER_U_ADDR(addr, blockend, regno)¸¦ Á¤ÀÇÇÑ´Ù¸é, ±×°ÍÀº addrÀ» GDB ·¹Áö½ºÅÍ ¹øÈ£ regnoÀÇ `user' ±¸Á¶³» offsetÀ¸·Î ¼³Á¤Çϵµ·Ï Á¤ÀÇ µÇ¾î¾ß ÇÑ´Ù. blockend´Â u.u_ar0ÀÇ "upage"³» offsetÀÌ´Ù. ¸¸ÀÏ REGISTER_U_ADDRÀÌ Á¤ÀǵǾú´Ù¸é, `core-aout.c'´Â register_addr()ÇÔ¼ö¸¦ Á¤ÀÇÇÏ°í ÇÔ¼ö³» ¸ÅÅ©·Î¸¦ »ç¿ëÇÑ´Ù. ¸¸ÀÏ ¿©·¯ºÐÀÌ REGISTER_U_ADDR Á¤ÀÇÇÏÁö ¾Ê¾Ò´Ù¸é, ±×·¯³ª Ç¥ÁØ fetch_core_registers()¸¦ »ç¿ëÇÑ´Ù¸é, ¿©·¯ºÐÀº ÀÚ½ÅÀÇ register_addr() ¹öÀüÀ» Á¤ÀÇÇÒ ÇÊ¿ä°¡ ÀÖÀ¸¸ç, ÇÔ¼ö¸¦ xyz-nat.c ÆÄÀÏ¿¡ ³Ö°í xyz-nat.o´Â NATDEPFILES ¸®½ºÆ®³» ÀÖ´Ù´Â °ÍÀ» È®½ÇÇÏ´Ù.

When making GDB run native on a new operating system, to make it possible to debug core files, you will need to either write specific code for parsing your OS's core files, or customize `bfd/trad-core.c'. First, use whatever #include files your machine uses to define the struct of registers that is accessible (possibly in the u-area) in a core file (rather than `machine/reg.h'), and an include file that defines whatever header exists on a core file (e.g. the u-area or a struct core). Then modify trad_unix_core_file_p to use these values to set up the section information for the data segment, stack segment, any other segments in the core file (perhaps shared library contents or control information), "registers" segment, and if there are two discontiguous sets of registers (e.g. integer and float), the "reg2" segment. This section information basically delimits areas in the core file in a standard way, which the section-reading routines in BFD know how to seek around in.

GDB°¡ »õ ¿ÀÆÛ·¹ÀÌÆà ½Ã½ºÅÛ¿¡¼­ native·Î µ¹¾Æ°¡µµ·Ï ¸¸µé°í, ÄÚ¾î ÆÄÀÏÀ» µð¹ö±ë °¡´ÉÇϵµ·Ï ¸¸µé±â À§ÇØ, ¿©·¯ºÐÀº OS ÄÚ¾î ÆÄÀÏÀ» ÆĽÌÇϱâ À§ÇÑ Æ¯º°ÇÑ Äڵ带 ¾²°Å³ª `bfd/trad-core.c'¸¦ Ä¿½ºÅ͸¶ÀÌ¡ÇÒ ÇÊ¿ä°¡ ÀÖ´Ù. ¿ì¼±, ¸Ó½Å³» #include ÆÄÀÏÀÌ ÄÚ¾î ÆÄÀÏ(`machine/reg.h' º¸´Ù´Â) ¿¡¼­ Á¢±ÙµÇ´Â ·¹Áö½ºÅÍ ±¸Á¶¸¦ Á¤ÀÇÇϱâ À§ÇØ »ç¿ëÇÑ °ÍÀÌ ¹«¾ùÀÌµç »ç¿ëÇضó. ±×¸®°í ÄÚ¾îÆÄÀÏ(u-area³ª struct core)¿¡ Á¸ÀçÇÏ´Â Çì´õ°¡ ¹«¾ùÀ̵ç Á¤ÀǵǾî ÀÖ´Â include ÆÄÀÏÀ» »ç¿ëÇضó. ±×¸®°í µ¥ÀÌÅÍ ¼¼±×¸ÕÆ®, ½ºÅà ¼¼±×¸ÕÆ®, ÄÚ¾î ÆÄÀÏ(¾Æ¸¶ °øÀ¯ ¶óÀ̺귯¸® ³»¿ëÀ̳ª Á¦¾î Á¤º¸)³» ´Ù¸¥ ¼¼±×¸ÕÆ®, "registers" ¼¼±×¸ÕÆ®¸¦ À§ÇÑ ¼½¼Ç Á¤º¸¸¦ ¼³Á¤Çϱâ À§ÇØ ÀÌ °ªµéÀ» »ç¿ëÇϵµ·Ï trad_unix_core_file_p¸¦ ¼öÁ¤Çضó. ±×¸®°í ¸¸ÀÏ µÎ°³ÀÇ ¿¬¼ÓÀûÀÌ´Ï ¾ÊÀº ·¹Áö½ºÅÍ ÁýÇÕ(e.g. integer¿Í float)ÀÌ ÀÖ´Ù¸é, "reg2" ¼¼±×¸ÕÆ®¸¦ ¼öÁ¤Çضó. ÀÌ ¼½¼Ç Á¤º¸´Â ±âº»ÀûÀ¸·Î Ç¥ÁØ ¹æ¹ýÀ¸·Î ÄÚ¾î ÆÄÀϳ» ¿µ¿ªÀÇ ÇѰ踦 ÁöÀ¸¸ç, BFD³» ¼½¼Ç Àб⠷çƾÀº Ž»öÇÒ ¹æ¹ýÀ» ¾È´Ù.

Then back in GDB, you need a matching routine called fetch_core_registers. If you can use the generic one, it's in `core-aout.c'; if not, it's in your `xyz-nat.c' file. It will be passed a char pointer to the entire "registers" segment, its length, and a zero; or a char pointer to the entire "regs2" segment, its length, and a 2. The routine should suck out the supplied register values and install them into GDB's "registers" array.

GDB·Î ´Ù½Ã °¡¼­, ¿©·¯ºÐÀº fetch_core_registers¸¦ È£ÃâÇÏ´Â ·çƾ°ú ¸ÅÄ¡½Ãų ÇÊ¿ä°¡ ÀÖ´Ù. ¸¸ÀÏ ¿©·¯ºÐÀÌ ÀϹÝÀûÀΰÍÀ» »ç¿ëÇÑ´Ù¸é, ±×°ÍÀº `core-aout.c'¿¡ ÀÖ´Ù; ¸¸ÀÏ ±×·¸Áö ¾Ê´Ù¸é, `xyz-nat.c' ÆÄÀϳ»¿¡ ÀÖ´Ù. Àüü "registers" ¼¼±×¸ÕÆ®, ±æÀÌ, 0¿¡ ´ëÇÑ char point¸¦ Àü´ÞÇÒ °ÍÀÌ´Ù.; ¶Ç´Â Àüü "regs2" ¼¼±×¸ÕÆ®, ±æÀÌ, a 2¿¡ ´ëÇÑ char point. ·çƾÀº Á¦°øµÇ´Â ·¹Áö½ºÅÍ °ªÀ» ¾ò¾î GDBÀÇ "registers" ¹è¿­¿¡ À̰͵éÀ» ¼³Ä¡ÇÑ´Ù.

If your system uses `/proc' to control processes, and uses ELF format core files, then you may be able to use the same routines for reading the registers out of processes and out of core files.

¸¸ÀÏ ½Ã½ºÅÛÀÌ ÇÁ·Î¼¼½º¸¦ Á¦¾îÇϱâ À§ÇØ `/proc'¸¦ »ç¿ëÇÑ´Ù¸é, ELF Çü½Ä ÄÚ¾î ÆÄÀÏÀ» »ç¿ëÇÑ´Ù¸é, ¿©·¯ºÐÀº ÇÁ·Î¼¼½º¿Í ÄÚ¾îÆÄÀÏ¿¡¼­ ·¹Áö½ºÅ͸¦ Àбâ À§ÇÑ °°Àº ·çƾÀ» »ç¿ëÇÒ¼ö ÀÖ´Ù.

ptrace

/proc

win32

shared libraries

°øÀ¯ ¶óÀ̺귯¸®

Native Conditionals

Native Á¶°Çµé

When GDB is configured and compiled, various macros are defined or left undefined, to control compilation when the host and target systems are the same. These macros should be defined (or left undefined) in `nm-system.h'.

GDB°¡ ¼³Á¤µÇ°í ÄÄÆÄÀϵɶ§, ´Ù¾çÇÑ macro°¡ È£½ºÆ®¿Í Ÿ°Ù ½Ã½ºÅÛÀÌ °°À»¶§ ÄÄÆÄÀÏÀ» Á¦¾îÇϱâ À§ÇØ Á¤ÀÇµÇ°í ¹ÌÁ¤ÀÇ »óÅ·Π³²¾Æ Àִ´Ù. ÀÌµé ¸ÅÅ©·Î´Â `nm-system.h'¿¡ Á¤ÀÇ(¶Ç´Â ¹ÌÁ¤ÀÇ·Î)µÇ¾î¾ß ÇÑ´Ù.

ATTACH_DETACH
If defined, then GDB will include support for the attach and detach commands.

¸¸ÀÏ Á¤ÀǵǾú´Ù¸é, GDB´Â attach¿Í detach ¸í·É¾î¿¡ ´ëÇÑ Áö¿øÀ» Æ÷ÇÔÇÑ´Ù.

CHILD_PREPARE_TO_STORE
If the machine stores all registers at once in the child process, then define this to ensure that all values are correct. This usually entails a read from the child. [Note that this is incorrectly defined in `xm-system.h' files currently.]

¸¸ÀÏ ¸Ó½ÅÀÌ ÀÚ½Ä ÇÁ·Î¼¼½º³» ¸ðµç ·¹Áö½ºÅ͸¦ ÀúÀåÇÑ´Ù¸é, ¸ðµç °ªÀÌ Á¤È®Çϴٴ°ÍÀ» È®½ÇÈ÷ Çϱâ À§ÇØ ÀÌ°ÍÀ» ÀúÀÇÇضó. ÀÌ°ÍÀº º¸Åë ÀڽĿ¡¼­ Àб⸦ »ó¼Ó¹Þ´Â´Ù. [ÀÌ°ÍÀº ÇöÀç `xm-system.h' ÆÄÀϳ» ºÎÁ¤È®ÇÏ°Ô Á¤ÀǵǾî ÀÖ´Ù.]

FETCH_INFERIOR_REGISTERS
Define this if the native-dependent code will provide its own routines fetch_inferior_registers and store_inferior_registers in `host-nat.c'. If this symbol is not defined, and `infptrace.c' is included in this configuration, the default routines in `infptrace.c' are used for these functions.

¸¸ÀÏ native-dependent Äڵ尡 `host-nat.c'¿¡ ÀÚ½ÅÀÇ ·çƾ fetch_inferior_registers°ú store_inferior_registers¸¦ Á¦°øÇÑ´Ù¸é ÀÌ°ÍÀ» Á¤ÀÇÇضó. ¸¸ÀÏ ÀÌ ½Éº¼ÀÌ Á¤ÀǵǾî ÀÖÁö ¾Ê°í `infptrace.c'ÀÌ ÀÌ ¼³Á¤¿¡¼­ Æ÷ÇԵǾî ÀÖ´Ù¸é, `infptrace.c'³» ±âº» ·çƾÀº À̵é ÇÔ¼ö¿¡¼­ »ç¿ëµÈ´Ù.

FILES_INFO_HOOK
(Convex¸¦ À§Çؼ­¸¸ Á¤ÀǵȴÙ.)
FP0_REGNUM
This macro is normally defined to be the number of the first floating point register, if the machine has such registers. As such, it would appear only in target-specific code. However, `/proc' support uses this to decide whether floats are in use on this target.

ÀÌ ¸ÅÅ©·Î´Â ¸¸ÀÏ ¸Ó½ÅÀÌ ±×·¯ÇÑ ·¹Áö½ºÅ͸¦ °¡Áö°í ÀÖ´Ù¸é, ºÎµ¿ ¼Ò¼öÁ¡ ·¹Áö½ºÅÍÀÇ ¼ö¸¦ Á¤ÀÇÇÑ´Ù. ÀÌ°ÍÀº Ÿ°Ù ƯÁ¤ Äڵ忡¼­¸¸ ³ªÅ¸³­´Ù. ±×·¯³ª, `/proc'Àº float°¡ ÀÌ Å¸°Ù¿¡¼­ »ç¿ëÁßÀÎÁö¸¦ °áÁ¤Çϱâ À§ÇØ ÀÌ°ÍÀÇ »ç¿ëÀ» Áö¿øÇÑ´Ù.

GET_LONGJMP_TARGET
For most machines, this is a target-dependent parameter. On the DECstation and the Iris, this is a native-dependent parameter, since `setjmp.h' is needed to define it. This macro determines the target PC address that longjmp will jump to, assuming that we have just stopped at a longjmp breakpoint. It takes a CORE_ADDR * as argument, and stores the target PC value through this pointer. It examines the current state of the machine as needed.

ÀçºÎºÐÀÇ ¸Ó½Å¿¡¼­, ÀÌ°ÍÀº Ÿ°Ù ÀÇÁ¸ÀûÀÎ ÀÎÀÚÀÌ´Ù. DECstation°ú Iris¿¡¼­, ÀÌ°ÍÀº native ÀÇÁ¸ÀûÀÎ ÀÎÀÚÀÌ´Ù. ¿Ö³ÄÇϸé `setjmp.h'´Â ÀÌ°ÍÀ» Á¤ÀÇÇϱâ À§ÇØ ÇÊ¿äÇϱ⠶§¹®ÀÌ´Ù. ÀÌ ¸ÅÅ©·Î´Â longjmp°¡ Á¡ÇÁÇÒ Å¸°Ù PC ÁÖ¼Ò¸¦ °áÁ¤Çϸç, longjmp breakpoint¿¡¼­ ¸ØÃßµµ·Ï °¡Á¤ÇÑ´Ù. ÀÎÀڷνá CORE_ADDR *¸¦ °¡Áö¸ç ÀÌ Æ÷ÀÎÅ͸¦ ÅëÇؼ­ Ÿ°Ù PC °ªÀ» ÀúÀåÇÑ´Ù. ÇÊ¿äÇÒ¶§ ¸Ó½ÅÀÇ ÇöÀç »óŸ¦ °Ë»çÇÑ´Ù.

I386_USE_GENERIC_WATCHPOINTS
An x86-based machine can define this to use the generic x86 watchpoint support; see section Algorithms.

x86 ±â¹Ý ¸Ó½ÅÀº ÀϹÝÀûÀÎ x86 watchpoint Áö¿øÀ» »ç¿ëÇϵµ·Ï Á¤ÀÇÇÒ¼ö ÀÖ´Ù.; ¾Ë°í¸®Áò ¼½¼ÇÀ» ÂüÁ¶Çضó.

KERNEL_U_ADDR
Define this to the address of the u structure (the "user struct", also known as the "u-page") in kernel virtual memory. GDB needs to know this so that it can subtract this address from absolute addresses in the upage, that are obtained via ptrace or from core files. On systems that don't need this value, set it to zero.

Ä¿³Î °¡»ó ¸Þ¸ð¸®³» u ±¸Á¶Ã¼("u-page"·Î½á ¾Ë·ÁÁø "user struct")ÀÇ ÁÖ¼Ò·Î Á¤ÀÇÇÑ´Ù. GDB´Â ÀÌ°ÍÀ» ¾Ë ÇÊ¿ä°¡ ÀÖ´Ù. ±×·¡¼­ upage³» Àý´ëÁÖ¼Ò¿¡¼­ ÀÌ ÁÖ¼Ò¸¦ »¬¼ö ÀÖÀ¸¸ç ptrace³ª core fileÀ» ÅëÇØ ¾ò´Â´Ù. ÀÌ °ªÀÌ ÇÊ¿ä¾ø´Â ½Ã½ºÅÛ¿¡¼­, ±×°ÍÀ» 0À¸·Î ¼³Á¤ÇÑ´Ù.

KERNEL_U_ADDR_BSD
Define this to cause GDB to determine the address of u at runtime, by using Berkeley-style nlist on the kernel's image in the root directory.

·çÆ® µð·ºÅ丮ÀÇ Ä¿³Î À̹ÌÁö³» Berkeley-style nlist¸¦ »ç¿ëÇÏ¿©, runtime½Ã uÀÇ ÁÖ¼Ò¸¦ °áÁ¤Çϵµ·Ï GDB¸¦ ¾ß±âÇϱâ À§ÇØ ÀÌ°ÍÀ» Á¤ÀÇÇÑ´Ù.

KERNEL_U_ADDR_HPUX
Define this to cause GDB to determine the address of u at runtime, by using HP-style nlist on the kernel's image in the root directory.

·çÆ® µð·ºÅ丮ÀÇ Ä¿³Î À̹ÌÁö³» HP-style nlist¸¦ »ç¿ëÇÏ¿©, runtime½Ã uÀÇ ÁÖ¼Ò¸¦ °áÁ¤Çϵµ·Ï GDB¸¦ ¾ß±âÇϱâ À§ÇØ ÀÌ°ÍÀ» Á¤ÀÇÇÑ´Ù.

ONE_PROCESS_WRITETEXT
Define this to be able to, when a breakpoint insertion fails, warn the user that another process may be running with the same executable.

breakpoint »ðÀÔÀÌ ½ÇÆÐÇÒ¶§, ´Ù¸¥ ÇÁ·Î¼¼½º°¡ °°Àº ½ÇÇàÆÄÀÏ·Î µ¹¸±Áö ¸ð¸£´Â »ç¿ëÀÚ¿¡°Ô °æ°í¸¦ ÁÙ¼ö ÀÖµµ·Ï ÀÌ°ÍÀ» Á¤ÀÇÇÑ´Ù.

PREPARE_TO_PROCEED (select_it)
This (ugly) macro allows a native configuration to customize the way the proceed function in `infrun.c' deals with switching between threads. In a multi-threaded task we may select another thread and then continue or step. But if the old thread was stopped at a breakpoint, it will immediately cause another breakpoint stop without any execution (i.e. it will report a breakpoint hit incorrectly). So GDB must step over it first. If defined, PREPARE_TO_PROCEED should check the current thread against the thread that reported the most recent event. If a step-over is required, it returns TRUE. If select_it is non-zero, it should reselect the old thread.

ÀÌ ¸ÅÅ©·Î´Â ¾²·¹µå ½ºÀ§ÄªÀ» ´Ù·ç´Â `infrun.c'³» proceed ÇÔ¼ö¸¦ Ä¿½ºÅ͸¶ÀÌ¡Çϱâ À§ÇØ native ¼³Á¤»çÇ×À» Çã¿ëÇÑ´Ù. ¸ÖƼ ¾²·¹µå ŽºÅ©¿¡¼­, ¿ì¸®´Â ´Ù¸¥ ¾²·¹µå¸¦ ¼±ÅÃÇÏ°í continue³ª stepÀ» °è¼ÓÇÑ´Ù. ±×·¯³ª ¸¸ÀÏ ¿¹Àü ¾²·¹µå°¡ breakpoint¿¡¼­ ¸ØÃá´Ù¸é, ¾î¶² ½ÇÇ൵ ¾øÀÌ Áï½Ã ´Ù¸¥ breakpoint stopÀ» ¾ß±âÇÑ´Ù. ±×·¡¼­ GDB´Â ¿ì¼± ¶Ù¾î ³Ñ¾î¾ß(step-over) ÇؾßÇÑ´Ù. ¸¸ÀÏ Á¤ÀǵǾú´Ù¸é, PREPARE_TO_PROCEED´Â °¡Àå ÃÖ±Ù À̺¥Æ®¸¦ º¸°íÇÑ ¾²·¹µå¿Í ´ëÁ¶ÀûÀÎ ÇöÀç ¾²·¹µå¸¦ °Ë»çÇØ¾ß ÇÑ´Ù. ¸¸ÀÏ step-over°¡ ¿ä±¸µÈ´Ù¸é, TRUE¸¦ ¹ÝȯÇÑ´Ù. ¸¸ÀÏ select_it°¡ 0ÀÌ ¾Æ´Ï¶ó¸é, ±×°ÍÀº ¿¹Àü ¾²·¹µå¸¦ ´Ù½Ã ¼±ÅÃÇÑ´Ù.

PROC_NAME_FMT
Defines the format for the name of a `/proc' device. Should be defined in `nm.h' only in order to override the default definition in `procfs.c'.

`/proc' ÀåÄ¡ÀÇ À̸§À» À§ÇÑ Çü½ÄÀ» Á¤ÀÇÇÑ´Ù. `procfs.c'¿¡ ÀÖ´Â ±âº» Á¤ÀǸ¦ ¿À¹ö¶óÀ̵ùÇϱâ À§ÇØ `nm.h'¿¡ Á¤ÀÇ Çؾ߸¸ ÇÑ´Ù.

PTRACE_FP_BUG
See `mach386-xdep.c'.

`mach386-xdep.c'¸¦ ÂüÁ¶Çضó.

PTRACE_ARG3_TYPE
The type of the third argument to the ptrace system call, if it exists and is different from int.

¸¸ÀÏ Á¸ÀçÇÏ°í int¿Í ´Ù¸£´Ù¸é, ptrace ½Ã½ºÅÛ ÄÝ¿¡ ´ëÇÑ ¼¼¹ø° ÀÎÀÚ Å¸ÀÔ.

REGISTER_U_ADDR
Defines the offset of the registers in the "u area".

"u area"³» ·¹Áö½ºÅÍÀÇ offsetÀ» Á¤ÀÇÇÑ´Ù.

SHELL_COMMAND_CONCAT
If defined, is a string to prefix on the shell command used to start the inferior.

Á¤ÀǵǾú´Ù¸é, ÀÌ°ÍÀº ³»ºÎ¿¡¼­ ½ÃÀÛÇϱâ À§ÇØ »ç¿ëµÇ´Â shell ¸í·É¾îÀÇ Á¢µÎ»ç¿¡ ´ëÇÑ ¹®ÀÚ¿­ÀÌ´Ù.

SHELL_FILE
If defined, this is the name of the shell to use to run the inferior. Defaults to "/bin/sh".

Á¤ÀǵǾú´Ù¸é, ÀÌ°ÍÀº ³»ºÎ¿¡¼­ ÀÛµ¿µÉ¶§ »ç¿ëÇÒ shellÀÇ À̸§ÀÌ´Ù. ±âº»Àº "/bin/sh"ÀÌ´Ù.

SOLIB_ADD (filename, from_tty, targ)
Define this to expand into an expression that will cause the symbols in filename to be added to GDB's symbol table.

ÀÌ°ÍÀº filename³» ½Éº¼À» GDB ½Éº¼ Å×ÀÌºí¿¡ Ãß°¡Çϵµ·Ï Ç¥Çö½ÄÀ» È®ÀåÇϵµ·Ï Á¤ÀÇÇÑ´Ù.

SOLIB_CREATE_INFERIOR_HOOK
Define this to expand into any shared-library-relocation code that you want to be run just after the child process has been forked.

ÀÌ°ÍÀº ¿©·¯ºÐÀÌ ÀÚ½Ä ÇÁ·Î¼¼½º°¡ forkµÈÈÄ µ¹¾Æ°¡±æ ¿øÇÏ´Â ¾î¶² °øÀ¯-¶óÀ̺귯¸®-ÀçÇÒ´ç ÄÚµå·Î È®ÀåÇϵµ·Ï Á¤ÀÇÇÑ´Ù.

START_INFERIOR_TRAPS_EXPECTED
When starting an inferior, GDB normally expects to trap twice; once when the shell execs, and once when the program itself execs. If the actual number of traps is something other than 2, then define this macro to expand into the number expected.

ÇÏÀ§ ºÎºÐÀ» ½ÃÀÛÇÒ¶§, GDB´Â º¸Åë 2¹ø trapµÉ°ÍÀ¸·Î ¿¹»óÇÑ´Ù.;shellÀÌ execµÉ¶§¿Í program ÀÚü°¡ execµÉ¶§. ¸¸ÀÏ trapÀÇ ½ÇÁ¦ ¼ö°¡ 2 ÀÌ»óÀ̶ó¸é, ¿¹»óµÈ ¼ö·Î È®ÀåÇϵµ·Ï ÀÌ ¸ÅÅ©·Î¸¦ Á¤ÀÇÇضó.

SVR4_SHARED_LIBS
Define this to indicate that SVR4-style shared libraries are in use.

SVR4-style °øÀ¯ ¶óÀ̺귯¸®°¡ »ç¿ëÁßÀÎÁö¸¦ °¡¸®Å°µµ·Ï Á¤ÀÇÇÑ´Ù.

USE_PROC_FS
This determines whether small routines in `*-tdep.c', which translate register values between GDB's internal representation and the `/proc' representation, are compiled.

ÀÌ°ÍÀº GDB ³»ºÎ Ç¥Çö°ú `/proc' Ç¥Çö »çÀÌÀÇ ·¹Áö½ºÅÍ °ªÀ» º¯È¯ÇÏ´Â `*-tdep.c'³» ÀÛÀº ·çƾµéÀÌ ÄÄÆÄÀϵǾú´ÀÁö ¾Æ´ÑÁö¸¦ °áÁ¤ÇÑ´Ù.

U_REGS_OFFSET
This is the offset of the registers in the upage. It need only be defined if the generic ptrace register access routines in `infptrace.c' are being used (that is, `infptrace.c' is configured in, and FETCH_INFERIOR_REGISTERS is not defined). If the default value from `infptrace.c' is good enough, leave it undefined. The default value means that u.u_ar0 points to the location of the registers. I'm guessing that #define U_REGS_OFFSET 0 means that u.u_ar0 is the location of the registers.

ÀÌ°ÍÀº upage¿¡ ÀÖ´Â ·¹Áö½ºÅÍÀÇ offsetÀÌ´Ù. ÀÌ°ÍÀº ¸¸ÀÏ `infptrace.c'ÀÇ ÀϹÝÀûÀÎ ptrace ·¹Áö½ºÅÍ Á¢±Ù ·çƾÀÌ »ç¿ëµÈ´Ù¸é Á¤ÀÇµÉ ÇÊ¿ä°¡ ÀÖ´Ù. (Áï, `infptrace.c'´Â ¼³Á¤µÇ°í FETCH_INFERIOR_REGISTERS´Â Á¤ÀÇ µÇÁö ¾Ê´Â´Ù.) ¸¸ÀÏ `infptrace.c'¿¡¼­ ±âº» °ªÀÌ ÃæºÐÈ÷ ÁÁ´Ù¸é, Á¤ÀǵÇÁö ¾ÊÀºÃ¼·Î ³²±ä´Ù. ±âº» °ªÀº u.u_ar0´Â ·¹Áö½ºÅÍÀÇ À§Ä¡¸¦ °¡¸®Å²´Ù´Â°ÍÀ» ÀǹÌÇÑ´Ù. °³ÀÎÀûÀ¸·Î #define U_REGS_OFFSET 0´Â u.u_ar0´Â ·¹Áö½ºÅÍÀÇ À§Ä¡À̴ٴ°ÍÀ» ÀǹÌÇÑ´Ù°í »ý°¢ÇÑ´Ù.

CLEAR_SOLIB
See `objfiles.c'.

`objfiles.c'¸¦ ÂüÁ¶Çضó.

DEBUG_PTRACE
Define this to debug ptrace calls.

ptrace È£ÃâÀ» µð¹ö±ëÇϱâ À§ÇØ ÀÌ°ÍÀ» »ç¿ëÇضó.


Go to the first, previous, next, last section, table of contents.