Changes between Version 15 and Version 16 of jazz/09-02-01


Ignore:
Timestamp:
Feb 2, 2009, 12:48:55 AM (15 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/09-02-01

    v15 v16  
    233233bt
    234234p utp->ut_time
     235p utp->ut_tv
    235236}}}
    236237{{{
     
    257258(gdb) p utp->ut_time
    258259There is no member named ut_time.
     260}}}
     261 * [註] utp->ut_time = utp->ut_tv.tv_sec
     262{{{
     263#!C
     264
     265< /usr/include/bits/utmp.h >
     266
     267 59 /* The structure describing an entry in the user accounting database.  */
     268 60 struct utmp
     269 61 {
     270 62   short int ut_type;            /* Type of login.  */
     271 63   pid_t ut_pid;                 /* Process ID of login process.  */
     272 64   char ut_line[UT_LINESIZE];    /* Devicename.  */
     273 65   char ut_id[4];                /* Inittab ID.  */
     274 66   char ut_user[UT_NAMESIZE];    /* Username.  */
     275 67   char ut_host[UT_HOSTSIZE];    /* Hostname for remote login.  */
     276 68   struct exit_status ut_exit;   /* Exit status of a process marked
     277 69                                    as DEAD_PROCESS.  */
     278 70 /* The ut_session and ut_tv fields must be the same size when compiled
     279 71    32- and 64-bit.  This allows data files and shared memory to be
     280 72    shared between 32- and 64-bit applications.  */
     281 73 #if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32
     282 74   int32_t ut_session;           /* Session ID, used for windowing.  */
     283 75   struct
     284 76   {
     285 77     int32_t tv_sec;             /* Seconds.  */
     286 78     int32_t tv_usec;            /* Microseconds.  */
     287 79   } ut_tv;                      /* Time entry was made.  */
     288 80 #else
     289 81   long int ut_session;          /* Session ID, used for windowing.  */
     290 82   struct timeval ut_tv;         /* Time entry was made.  */
     291 83 #endif
     292 84
     293 85   int32_t ut_addr_v6[4];        /* Internet address of remote host.  */
     294 86   char __unused[20];            /* Reserved for future use.  */
     295 87 };
     296
     297 94 # define ut_time        ut_tv.tv_sec
    259298}}}
    260299 * GDB 線上除錯練習