values.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  1. /* Low level packing and unpacking of values for GDB.
  2. Copyright (C) 1986 Free Software Foundation, Inc.
  3. GDB is distributed in the hope that it will be useful, but WITHOUT ANY
  4. WARRANTY. No author or distributor accepts responsibility to anyone
  5. for the consequences of using it or for whether it serves any
  6. particular purpose or works at all, unless he says so in writing.
  7. Refer to the GDB General Public License for full details.
  8. Everyone is granted permission to copy, modify and redistribute GDB,
  9. but only under the conditions described in the GDB General Public
  10. License. A copy of this license is supposed to have been given to you
  11. along with GDB so you can know your rights and responsibilities. It
  12. should be in a file named COPYING. Among other things, the copyright
  13. notice and this notice must be preserved on all copies.
  14. In other words, go ahead and share GDB, but don't try to stop
  15. anyone else from sharing it farther. Help stamp out software hoarding!
  16. */
  17. #include <stdio.h>
  18. #include "defs.h"
  19. #include "initialize.h"
  20. #include "param.h"
  21. #include "symtab.h"
  22. #include "value.h"
  23. /* The value-history records all the values printed
  24. by print commands during this session. Each chunk
  25. records 60 consecutive values. The first chunk on
  26. the chain records the most recent values.
  27. The total number of values is in value_history_count. */
  28. #define VALUE_HISTORY_CHUNK 60
  29. struct value_history_chunk
  30. {
  31. struct value_history_chunk *next;
  32. value values[VALUE_HISTORY_CHUNK];
  33. };
  34. /* Chain of chunks now in use. */
  35. static struct value_history_chunk *value_history_chain;
  36. static int value_history_count; /* Abs number of last entry stored */
  37. START_FILE
  38. /* List of all value objects currently allocated
  39. (except for those released by calls to release_value)
  40. This is so they can be freed after each command. */
  41. static value all_values;
  42. /* Allocate a value that has the correct length for type TYPE. */
  43. value
  44. allocate_value (type)
  45. struct type *type;
  46. {
  47. register value val;
  48. val = (value) xmalloc (sizeof (struct value) + TYPE_LENGTH (type));
  49. VALUE_NEXT (val) = all_values;
  50. all_values = val;
  51. VALUE_TYPE (val) = type;
  52. VALUE_LVAL (val) = not_lval;
  53. VALUE_ADDRESS (val) = 0;
  54. VALUE_OFFSET (val) = 0;
  55. VALUE_BITPOS (val) = 0;
  56. VALUE_BITSIZE (val) = 0;
  57. VALUE_REPEATED (val) = 0;
  58. VALUE_REPETITIONS (val) = 0;
  59. VALUE_REGNO (val) = -1;
  60. return val;
  61. }
  62. /* Allocate a value that has the correct length
  63. for COUNT repetitions type TYPE. */
  64. value
  65. allocate_repeat_value (type, count)
  66. struct type *type;
  67. int count;
  68. {
  69. register value val;
  70. val = (value) xmalloc (sizeof (struct value) + TYPE_LENGTH (type) * count);
  71. VALUE_NEXT (val) = all_values;
  72. all_values = val;
  73. VALUE_TYPE (val) = type;
  74. VALUE_LVAL (val) = not_lval;
  75. VALUE_ADDRESS (val) = 0;
  76. VALUE_OFFSET (val) = 0;
  77. VALUE_BITPOS (val) = 0;
  78. VALUE_BITSIZE (val) = 0;
  79. VALUE_REPEATED (val) = 1;
  80. VALUE_REPETITIONS (val) = count;
  81. VALUE_REGNO (val) = -1;
  82. return val;
  83. }
  84. /* Free all the values that have been allocated (except for those released).
  85. Called after each command, successful or not. */
  86. void
  87. free_all_values ()
  88. {
  89. register value val, next;
  90. for (val = all_values; val; val = next)
  91. {
  92. next = VALUE_NEXT (val);
  93. free (val);
  94. }
  95. all_values = 0;
  96. }
  97. /* Remove VAL from the chain all_values
  98. so it will not be freed automatically. */
  99. void
  100. release_value (val)
  101. register value val;
  102. {
  103. register value v;
  104. if (all_values == val)
  105. {
  106. all_values = val->next;
  107. return;
  108. }
  109. for (v = all_values; v; v = v->next)
  110. {
  111. if (v->next == val)
  112. {
  113. v->next = val->next;
  114. break;
  115. }
  116. }
  117. }
  118. /* Return a copy of the value ARG.
  119. It contains the same contents, for same memory address,
  120. but it's a different block of storage. */
  121. static value
  122. value_copy (arg)
  123. value arg;
  124. {
  125. register value val;
  126. register struct type *type = VALUE_TYPE (arg);
  127. if (VALUE_REPEATED (arg))
  128. val = allocate_repeat_value (type, VALUE_REPETITIONS (arg));
  129. else
  130. val = allocate_value (type);
  131. VALUE_LVAL (val) = VALUE_LVAL (arg);
  132. VALUE_ADDRESS (val) = VALUE_ADDRESS (arg);
  133. VALUE_OFFSET (val) = VALUE_OFFSET (arg);
  134. VALUE_BITPOS (val) = VALUE_BITPOS (arg);
  135. VALUE_BITSIZE (val) = VALUE_BITSIZE (arg);
  136. VALUE_REGNO (val) = VALUE_REGNO (arg);
  137. bcopy (VALUE_CONTENTS (arg), VALUE_CONTENTS (val),
  138. TYPE_LENGTH (VALUE_TYPE (arg))
  139. * (VALUE_REPEATED (arg) ? VALUE_REPETITIONS (arg) : 1));
  140. return val;
  141. }
  142. /* Access to the value history. */
  143. /* Record a new value in the value history.
  144. Returns the absolute history index of the entry. */
  145. int
  146. record_latest_value (val)
  147. value val;
  148. {
  149. register int i;
  150. /* Get error now if about to store an invalid float. */
  151. if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_FLT)
  152. value_as_double (val);
  153. /* Here we treat value_history_count as origin-zero
  154. and applying to the value being stored now. */
  155. i = value_history_count % VALUE_HISTORY_CHUNK;
  156. if (i == 0)
  157. {
  158. register struct value_history_chunk *new
  159. = (struct value_history_chunk *) xmalloc (sizeof (struct value_history_chunk));
  160. bzero (new->values, sizeof new->values);
  161. new->next = value_history_chain;
  162. value_history_chain = new;
  163. }
  164. value_history_chain->values[i] = val;
  165. release_value (val);
  166. /* Now we regard value_history_count as origin-one
  167. and applying to the value just stored. */
  168. return ++value_history_count;
  169. }
  170. /* Return a copy of the value in the history with sequence number NUM. */
  171. value
  172. access_value_history (num)
  173. int num;
  174. {
  175. register struct value_history_chunk *chunk;
  176. register int i;
  177. register absnum = num;
  178. if (absnum <= 0)
  179. absnum += value_history_count;
  180. if (absnum <= 0)
  181. {
  182. if (num == 0)
  183. error ("The history is empty.");
  184. else if (num == 1)
  185. error ("There is only one value in the history.");
  186. else
  187. error ("History does not go back to $$%d.", -num);
  188. }
  189. if (absnum > value_history_count)
  190. error ("History has not yet reached $%d.", absnum);
  191. absnum--;
  192. /* Now absnum is always absolute and origin zero. */
  193. chunk = value_history_chain;
  194. for (i = (value_history_count - 1) / VALUE_HISTORY_CHUNK - absnum / VALUE_HISTORY_CHUNK;
  195. i > 0; i--)
  196. chunk = chunk->next;
  197. return value_copy (chunk->values[absnum % VALUE_HISTORY_CHUNK]);
  198. }
  199. /* Clear the value history entirely.
  200. Must be done when new symbol tables are loaded,
  201. because the type pointers become invalid. */
  202. void
  203. clear_value_history ()
  204. {
  205. register struct value_history_chunk *next;
  206. register int i;
  207. register value val;
  208. while (value_history_chain)
  209. {
  210. for (i = 0; i < VALUE_HISTORY_CHUNK; i++)
  211. if (val = value_history_chain->values[i])
  212. free (val);
  213. next = value_history_chain->next;
  214. free (value_history_chain);
  215. value_history_chain = next;
  216. }
  217. value_history_count = 0;
  218. }
  219. static void
  220. history_info (num_exp)
  221. char *num_exp;
  222. {
  223. register int i;
  224. register value val;
  225. register int num;
  226. if (num_exp)
  227. num = parse_and_eval_address (num_exp) - 5;
  228. else
  229. num = value_history_count - 9;
  230. if (num <= 0)
  231. num = 1;
  232. for (i = num; i < num + 10 && i <= value_history_count; i++)
  233. {
  234. val = access_value_history (i);
  235. printf ("$%d = ", i);
  236. value_print (val, stdout);
  237. printf ("\n");
  238. }
  239. }
  240. /* Internal variables. These are variables within the debugger
  241. that hold values assigned by debugger commands.
  242. The user refers to them with a '$' prefix
  243. that does not appear in the variable names stored internally. */
  244. static struct internalvar *internalvars;
  245. /* Look up an internal variable with name NAME. NAME should not
  246. normally include a dollar sign.
  247. If the specified internal variable does not exist,
  248. one is created, with a void value. */
  249. struct internalvar *
  250. lookup_internalvar (name)
  251. char *name;
  252. {
  253. register struct internalvar *var;
  254. for (var = internalvars; var; var = var->next)
  255. if (!strcmp (var->name, name))
  256. return var;
  257. var = (struct internalvar *) xmalloc (sizeof (struct internalvar));
  258. var->name = concat (name, "", "");
  259. var->value = allocate_value (builtin_type_void);
  260. release_value (var->value);
  261. var->next = internalvars;
  262. internalvars = var;
  263. return var;
  264. }
  265. value
  266. value_of_internalvar (var)
  267. struct internalvar *var;
  268. {
  269. register value val = value_copy (var->value);
  270. VALUE_LVAL (val) = lval_internalvar;
  271. VALUE_INTERNALVAR (val) = var;
  272. }
  273. void
  274. set_internalvar_component (var, offset, bitpos, bitsize, newval)
  275. struct internalvar *var;
  276. int offset, bitpos, bitsize;
  277. value newval;
  278. {
  279. register char *addr = VALUE_CONTENTS (var->value) + offset;
  280. if (bitsize)
  281. modify_field (addr, value_as_long (newval),
  282. bitpos, bitsize);
  283. else
  284. bcopy (VALUE_CONTENTS (newval), addr,
  285. TYPE_LENGTH (VALUE_TYPE (newval)));
  286. }
  287. void
  288. set_internalvar (var, val)
  289. struct internalvar *var;
  290. value val;
  291. {
  292. free (var->value);
  293. var->value = value_copy (val);
  294. release_value (var->value);
  295. }
  296. char *
  297. internalvar_name (var)
  298. struct internalvar *var;
  299. {
  300. return var->name;
  301. }
  302. /* Free all internalvars. Done when new symtabs are loaded,
  303. because that makes the values invalid. */
  304. void
  305. clear_internalvars ()
  306. {
  307. register struct internalvar *var;
  308. while (internalvars)
  309. {
  310. var = internalvars;
  311. internalvars = var->next;
  312. free (var->name);
  313. free (var->value);
  314. free (var);
  315. }
  316. }
  317. static void
  318. convenience_info ()
  319. {
  320. register struct internalvar *var;
  321. if (internalvars)
  322. printf ("Debugger convenience variables:\n\n");
  323. else
  324. printf ("No debugger convenience variables now defined.\n\
  325. Convenience variables have names starting with \"$\";\n\
  326. use \"set\" as in \"set $foo = 5\" to define them.\n");
  327. for (var = internalvars; var; var = var->next)
  328. {
  329. printf ("$%s: ", var->name);
  330. value_print (var->value, stdout);
  331. printf ("\n");
  332. }
  333. }
  334. /* Extract a value as a C number (either long or double).
  335. Knows how to convert fixed values to double, or
  336. floating values to long.
  337. Does not deallocate the value. */
  338. long
  339. value_as_long (val)
  340. register value val;
  341. {
  342. return unpack_long (VALUE_TYPE (val), VALUE_CONTENTS (val));
  343. }
  344. double
  345. value_as_double (val)
  346. register value val;
  347. {
  348. return unpack_double (VALUE_TYPE (val), VALUE_CONTENTS (val));
  349. }
  350. /* Unpack raw data (copied from debugee) at VALADDR
  351. as a long, or as a double, assuming the raw data is described
  352. by type TYPE. Knows how to convert different sizes of values
  353. and can convert between fixed and floating point. */
  354. long
  355. unpack_long (type, valaddr)
  356. struct type *type;
  357. char *valaddr;
  358. {
  359. register enum type_code code = TYPE_CODE (type);
  360. register int len = TYPE_LENGTH (type);
  361. register int nosign = TYPE_UNSIGNED (type);
  362. if (code == TYPE_CODE_ENUM)
  363. code = TYPE_CODE_INT;
  364. if (code == TYPE_CODE_FLT)
  365. {
  366. if (len == sizeof (float))
  367. return * (float *) valaddr;
  368. if (len == sizeof (double))
  369. return * (double *) valaddr;
  370. }
  371. else if (code == TYPE_CODE_INT && nosign)
  372. {
  373. if (len == sizeof (char))
  374. return * (unsigned char *) valaddr;
  375. if (len == sizeof (short))
  376. return * (unsigned short *) valaddr;
  377. if (len == sizeof (int))
  378. return * (unsigned int *) valaddr;
  379. if (len == sizeof (long))
  380. return * (unsigned long *) valaddr;
  381. }
  382. else if (code == TYPE_CODE_INT)
  383. {
  384. if (len == sizeof (char))
  385. return * (char *) valaddr;
  386. if (len == sizeof (short))
  387. return * (short *) valaddr;
  388. if (len == sizeof (int))
  389. return * (int *) valaddr;
  390. if (len == sizeof (long))
  391. return * (long *) valaddr;
  392. }
  393. else if (code == TYPE_CODE_PTR)
  394. {
  395. if (len == sizeof (char *))
  396. return (CORE_ADDR) * (char **) valaddr;
  397. }
  398. error ("Value not integer or pointer.");
  399. }
  400. double
  401. unpack_double (type, valaddr)
  402. struct type *type;
  403. char *valaddr;
  404. {
  405. register enum type_code code = TYPE_CODE (type);
  406. register int len = TYPE_LENGTH (type);
  407. register int nosign = TYPE_UNSIGNED (type);
  408. if (code == TYPE_CODE_FLT)
  409. {
  410. if (INVALID_FLOAT (valaddr))
  411. error ("Invalid floating value found in program.");
  412. if (len == sizeof (float))
  413. return * (float *) valaddr;
  414. if (len == sizeof (double))
  415. return * (double *) valaddr;
  416. }
  417. else if (code == TYPE_CODE_INT && nosign)
  418. {
  419. if (len == sizeof (char))
  420. return * (unsigned char *) valaddr;
  421. if (len == sizeof (short))
  422. return * (unsigned short *) valaddr;
  423. if (len == sizeof (int))
  424. return * (unsigned int *) valaddr;
  425. if (len == sizeof (long))
  426. return * (unsigned long *) valaddr;
  427. }
  428. else if (code == TYPE_CODE_INT)
  429. {
  430. if (len == sizeof (char))
  431. return * (char *) valaddr;
  432. if (len == sizeof (short))
  433. return * (short *) valaddr;
  434. if (len == sizeof (int))
  435. return * (int *) valaddr;
  436. if (len == sizeof (long))
  437. return * (long *) valaddr;
  438. }
  439. error ("Value not floating number.");
  440. }
  441. /* Given a value ARG1 of a struct or union type,
  442. extract and return the value of one of its fields.
  443. FIELDNO says which field. */
  444. value
  445. value_field (arg1, fieldno)
  446. register value arg1;
  447. register int fieldno;
  448. {
  449. register value v;
  450. register struct type *type = TYPE_FIELD_TYPE (VALUE_TYPE (arg1), fieldno);
  451. register int offset;
  452. /* Handle packed fields */
  453. offset = TYPE_FIELD_BITPOS (VALUE_TYPE (arg1), fieldno) / 8;
  454. if (TYPE_FIELD_BITSIZE (VALUE_TYPE (arg1), fieldno))
  455. {
  456. v = value_from_long (type,
  457. unpack_field_as_long (VALUE_TYPE (arg1),
  458. VALUE_CONTENTS (arg1),
  459. fieldno));
  460. VALUE_BITPOS (v) = TYPE_FIELD_BITPOS (VALUE_TYPE (arg1), fieldno) % 8;
  461. VALUE_BITSIZE (v) = TYPE_FIELD_BITSIZE (VALUE_TYPE (arg1), fieldno);
  462. }
  463. else
  464. {
  465. v = allocate_value (type);
  466. bcopy (VALUE_CONTENTS (arg1) + offset,
  467. VALUE_CONTENTS (v),
  468. TYPE_LENGTH (type));
  469. }
  470. VALUE_LVAL (v) = VALUE_LVAL (arg1);
  471. if (VALUE_LVAL (arg1) == lval_internalvar)
  472. VALUE_LVAL (v) = lval_internalvar_component;
  473. VALUE_ADDRESS (v) = VALUE_ADDRESS (arg1);
  474. VALUE_OFFSET (v) = offset + VALUE_OFFSET (arg1);
  475. return v;
  476. }
  477. long
  478. unpack_field_as_long (type, valaddr, fieldno)
  479. struct type *type;
  480. char *valaddr;
  481. int fieldno;
  482. {
  483. long val;
  484. int bitpos = TYPE_FIELD_BITPOS (type, fieldno);
  485. int bitsize = TYPE_FIELD_BITSIZE (type, fieldno);
  486. union { int i; char c; } test;
  487. bcopy (valaddr + bitpos / 8, &val, sizeof val);
  488. /* Extracting bits depends on endianness of the machine. */
  489. test.c = 1;
  490. if (test.i == 1)
  491. /* Little-endian. */
  492. val >>= bitpos % 8;
  493. else
  494. val >>= sizeof val * 8 - bitpos % 8 - bitsize;
  495. val &= (1 << bitsize) - 1;
  496. return val;
  497. }
  498. modify_field (addr, fieldval, bitpos, bitsize)
  499. char *addr;
  500. int fieldval;
  501. int bitpos, bitsize;
  502. {
  503. long oword;
  504. union { int i; char c; } test;
  505. bcopy (addr, &oword, sizeof oword);
  506. /* Shifting for bit field depends on endianness of the machine. */
  507. test.c = 1;
  508. if (test.i != 1)
  509. /* not little-endian: assume big-endian. */
  510. bitpos = sizeof oword * 8 - bitpos - bitsize;
  511. oword &= ~(((1 << bitsize) - 1) << bitpos);
  512. oword |= fieldval << bitpos;
  513. bcopy (&oword, addr, sizeof oword);
  514. }
  515. /* Convert C numbers into newly allocated values */
  516. value
  517. value_from_long (type, num)
  518. struct type *type;
  519. register long num;
  520. {
  521. register value val = allocate_value (type);
  522. register enum type_code code = TYPE_CODE (type);
  523. register int len = TYPE_LENGTH (type);
  524. if (code == TYPE_CODE_INT || code == TYPE_CODE_ENUM)
  525. {
  526. if (len == sizeof (char))
  527. * (char *) VALUE_CONTENTS (val) = num;
  528. else if (len == sizeof (short))
  529. * (short *) VALUE_CONTENTS (val) = num;
  530. else if (len == sizeof (int))
  531. * (int *) VALUE_CONTENTS (val) = num;
  532. else if (len == sizeof (long))
  533. * (long *) VALUE_CONTENTS (val) = num;
  534. else
  535. error ("Integer type encountered with unexpected data length.");
  536. }
  537. else
  538. error ("Unexpected type encountered for integer constant.");
  539. return val;
  540. }
  541. value
  542. value_from_double (type, num)
  543. struct type *type;
  544. double num;
  545. {
  546. register value val = allocate_value (type);
  547. register enum type_code code = TYPE_CODE (type);
  548. register int len = TYPE_LENGTH (type);
  549. if (code == TYPE_CODE_FLT)
  550. {
  551. if (len == sizeof (float))
  552. * (float *) VALUE_CONTENTS (val) = num;
  553. else if (len == sizeof (double))
  554. * (double *) VALUE_CONTENTS (val) = num;
  555. else
  556. error ("Floating type encountered with unexpected data length.");
  557. }
  558. else
  559. error ("Unexpected type encountered for floating constant.");
  560. return val;
  561. }
  562. /* Deal with the value that is "about to be returned". */
  563. /* Return the value that a function returning now
  564. would be returning to its caller, assuming its type is VALTYPE.
  565. RETBUF is where we look for what ought to be the contents
  566. of registers 0 and 1. This is because it is often
  567. desirable to restore old values to those registers
  568. after saving the contents of interest, and then call
  569. this function using the saved values. */
  570. value
  571. value_being_returned (valtype, retbuf)
  572. register struct type *valtype;
  573. REGISTER_TYPE retbuf[];
  574. {
  575. register value val;
  576. if (TYPE_CODE (valtype) == TYPE_CODE_STRUCT
  577. || TYPE_CODE (valtype) == TYPE_CODE_UNION)
  578. return value_at (valtype, retbuf[0]);
  579. val = allocate_value (valtype);
  580. bcopy (retbuf, VALUE_CONTENTS (val),
  581. TYPE_LENGTH (valtype));
  582. return val;
  583. }
  584. /* Store VAL so it will be returned if a function returns now.
  585. Does not verify that VAL's type matches what the current
  586. function wants to return. */
  587. void
  588. set_return_value (val)
  589. value val;
  590. {
  591. register enum type_code code = TYPE_CODE (VALUE_TYPE (val));
  592. REGISTER_TYPE retbuf[2];
  593. double dbuf;
  594. long lbuf;
  595. if (code == TYPE_CODE_STRUCT
  596. || code == TYPE_CODE_UNION)
  597. error ("Specifying a struct or union return value is not supported.");
  598. if (code == TYPE_CODE_FLT)
  599. {
  600. dbuf = value_as_double (val);
  601. bcopy (&dbuf, retbuf, sizeof dbuf);
  602. }
  603. else
  604. {
  605. lbuf = value_as_long (val);
  606. bcopy (&lbuf, retbuf, sizeof lbuf);
  607. }
  608. write_register (0, retbuf[0]);
  609. write_register (1, retbuf[1]);
  610. }
  611. static
  612. initialize ()
  613. {
  614. add_info ("convenience", convenience_info,
  615. "Debugger convenience (\"$foo\") variables.\n\
  616. These variables are created when you assign them values;\n\
  617. thus, \"print $foo=1\" gives \"$foo\" the value 1. Values may be any type.\n\n\
  618. A few convenience variables are given values automatically GDB:\n\
  619. \"$_\"holds the last address examined with \"x\" or \"info lines\",\n\
  620. \"$__\" holds the contents of the last address examined with \"x\".");
  621. add_info ("history", history_info,
  622. "Elements of value history (around item number IDX, or last ten).");
  623. }
  624. END_FILE