tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Porting Corosync/Pacemaker - Help needed with gdb
This is the struct pthread_t, right? It is the second element of the
conn_info structure in this case:
(gdb) p conn_info
$1 = (struct conn_info *) 0x7f7ff7391000
(gdb) p *$
$2 = {fd = 15, thread = 0x7f7fefc00000, client_pid = 0, thread_attr =
{pta_magic = 572653570, pta_flags = 0, pta_private = 0x7f7ff7b1b2a0},
service = 9, state = CONN_STATE_THREAD_ACTIVE, refcount = 1,
stats_handle = 2085465522836602921,
semkey = 424238335, pending_semops = 0, mutex = {ptm_magic =
858980355, ptm_errorcheck = 0 '\000', ptm_pad1 = "\000\000",
ptm_interlock = 0 '\000', ptm_pad2 = "\000\000", ptm_owner = 0x0,
ptm_waiters = 0x0, ptm_recursed = 0,
ptm_spare2 = 0x0}, control_buffer = 0x7f7ff7fc8000, request_buffer
= 0x7f7ff7ec8000 "U\002", response_buffer = 0x7f7ff6b00000 <Address
0x7f7ff6b00000 out of bounds>,
dispatch_buffer = 0x7f7ff0000000 <Address 0x7f7ff0000000 out of
bounds>, control_size = 8192, request_size = 1048576, response_size =
1048576, dispatch_size = 1048576, outq_head = {next = 0x7f7ff73910c0,
prev = 0x7f7ff73910c0},
private_data = 0x7f7ff7b2d164, list = {next = 0x7f7ff72054e0, prev =
0x7f7ff72054e0},
setup_msg =
"\t\000\000\000\000\000\000\000\377\\I\031\000\000\000\000/var/run/control_buffer-03299b",
'\000' <repeats 994 times>, "/var/run/request_buffer-03299d", '\000'
<repeats 994 times>, "/var/run/response_buffer-03299f", '\000'
<repeats 993 times>, "/var/run/dispatch_buffer-03299h", '\000'
<repeats 994 times>, "
\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000"...,
setup_bytes_read = 0, zcb_mapped_list_head = {
next = 0x7f7ff7392120, prev = 0x7f7ff7392120},
sending_allowed_private_data = {0x0 <repeats 64 times>}, poll_state =
1}
Points to 0x7f7fefc00000.....
2012/12/7 Joerg Sonnenberger <joerg%britannica.bec.de@localhost>:
> On Fri, Dec 07, 2012 at 12:29:37PM +0100, Stephan wrote:
>> ------8<----------
>> 0000000000007920 <__libc_mutex_trylock>:
>> 7920: 64 48 8b 04 25 00 00 mov %fs:0x0,%rax
>> 7927: 00 00
>> 7929: 48 8b 48 10 mov 0x10(%rax),%rcx
>> 792d: 31 d2 xor %edx,%edx
>> 792f: 48 89 d0 mov %rdx,%rax
>> 7932: f0 48 0f b1 4f 10 lock cmpxchg %rcx,0x10(%rdi)
>> ------------------
>>
>> The question is what the first 2 mov instructions are supposed to do.
>> What is %rax supposed to point to?
>
> Load pthread_self().
>
> Joerg
Home |
Main Index |
Thread Index |
Old Index