.. | .. |
---|
73 | 73 | super(LxPs, self).__init__("lx-ps", gdb.COMMAND_DATA) |
---|
74 | 74 | |
---|
75 | 75 | def invoke(self, arg, from_tty): |
---|
| 76 | + gdb.write("{:>10} {:>12} {:>7}\n".format("TASK", "PID", "COMM")) |
---|
76 | 77 | for task in task_lists(): |
---|
77 | | - gdb.write("{address} {pid} {comm}\n".format( |
---|
78 | | - address=task, |
---|
79 | | - pid=task["pid"], |
---|
80 | | - comm=task["comm"].string())) |
---|
| 78 | + gdb.write("{} {:^5} {}\n".format( |
---|
| 79 | + task.format_string().split()[0], |
---|
| 80 | + task["pid"].format_string(), |
---|
| 81 | + task["comm"].string())) |
---|
| 82 | + |
---|
81 | 83 | |
---|
82 | 84 | LxPs() |
---|
83 | 85 | |
---|
.. | .. |
---|
134 | 136 | else: |
---|
135 | 137 | raise gdb.GdbError("No task of PID " + str(pid)) |
---|
136 | 138 | |
---|
| 139 | + |
---|
137 | 140 | LxThreadInfoByPidFunc() |
---|