Updated with Tizen:Base source codes
[external/procps.git] / packaging / procps-3.2.7-ps-eip64.patch
1 --- procps-3.2.7/ps/ps.1.eip64  2007-06-14 11:08:35.000000000 +0200
2 +++ procps-3.2.7/ps/ps.1        2007-06-14 11:03:28.000000000 +0200
3 @@ -1156,6 +1156,14 @@
4  or\ a\ decimal representation otherwise.
5  T}
6  
7 +rip    RIP     T{
8 +64-bit instruction pointer.
9 +T}
10 +
11 +rsp    RSP     T{
12 +64-bit stack pointer.
13 +T}
14 +
15  rss    RSS     T{
16  resident set size, the non\-swapped physical memory that
17  a task has used (in\ kiloBytes).
18 --- procps-3.2.7/ps/output.c.eip64      2007-06-14 11:08:24.000000000 +0200
19 +++ procps-3.2.7/ps/output.c    2007-06-14 10:58:21.000000000 +0200
20 @@ -764,10 +764,18 @@
21      return snprintf(outbuf, COLWID, "%08x", (unsigned)(pp->kstk_esp));
22  }
23  
24 +static int pr_rsp(char *restrict const outbuf, const proc_t *restrict const pp){
25 +    return snprintf(outbuf, COLWID, "%016lx", (unsigned long)(pp->kstk_esp));
26 +}
27 +
28  static int pr_eip(char *restrict const outbuf, const proc_t *restrict const pp){
29      return snprintf(outbuf, COLWID, "%08x", (unsigned)(pp->kstk_eip));
30  }
31  
32 +static int pr_rip(char *restrict const outbuf, const proc_t *restrict const pp){
33 +    return snprintf(outbuf, COLWID, "%016lx", (unsigned long)(pp->kstk_eip));
34 +}
35 +
36  /* This function helps print old-style time formats */
37  static int old_time_helper(char *dst, unsigned long long t, unsigned long long rel) {
38    if(!t)            return snprintf(dst, COLWID, "    -");
39 @@ -1403,7 +1411,9 @@
40  {"resident",  "RES",     pr_nop,      sr_resident, 5,MEM,    LNX, PO|RIGHT},
41  {"rgid",      "RGID",    pr_rgid,     sr_rgid,    5,   0,    XXX, ET|RIGHT},
42  {"rgroup",    "RGROUP",  pr_rgroup,   sr_rgroup,  8, GRP,    U98, ET|USER}, /* was 8 wide */
43 +{"rip",       "RIP",     pr_rip,      sr_kstk_eip, 16, 0,    LNX, TO|RIGHT},
44  {"rlink",     "RLINK",   pr_nop,      sr_nop,     8,   0,    BSD, AN|RIGHT},
45 +{"rsp",       "RSP",     pr_rsp,      sr_kstk_eip, 16, 0,    LNX, TO|RIGHT},
46  {"rss",       "RSS",     pr_rss,      sr_rss,     5,   0,    XXX, PO|RIGHT}, /* was 5 wide */
47  {"rssize",    "RSS",     pr_rss,      sr_vm_rss,  5,   0,    DEC, PO|RIGHT}, /*rsz*/
48  {"rsz",       "RSZ",     pr_rss,      sr_vm_rss,  5,   0,    BSD, PO|RIGHT}, /*rssize*/