[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/9] tcg: declare __jit_debug_descriptor to be s
From: |
Jim Meyering |
Subject: |
Re: [Qemu-devel] [PATCH 2/9] tcg: declare __jit_debug_descriptor to be static |
Date: |
Mon, 21 May 2012 22:10:27 +0200 |
Peter Maydell wrote:
> On 21 May 2012 20:51, Jim Meyering <address@hidden> wrote:
>> From: Jim Meyering <address@hidden>
>>
>>
>> Signed-off-by: Jim Meyering <address@hidden>
>> ---
>> tcg/tcg.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tcg/tcg.c b/tcg/tcg.c
>> index ab589c7..350fdad 100644
>> --- a/tcg/tcg.c
>> +++ b/tcg/tcg.c
>> @@ -2293,7 +2293,7 @@ void __jit_debug_register_code(void)
>>
>> /* Must statically initialize the version, because GDB may check
>> the version before we can set it. */
>> -struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
>> +static struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
>>
>> /* End GDB interface. */
>
> Nak. This symbol is global so that gdb can find it by fishing around
> in the executable's symbol table.
Thanks for the quick feedback.
How does the scope of the symbol affect whether gdb can find it?
With it declared static, it seems to be no less visible than before:
$ gdb --eval 'p __jit_debug_descriptor' x86_64-softmmu/qemu-system-x86_64
Reading symbols from
/h/j/w/co/qemu/x86_64-softmmu/qemu-system-x86_64...done.
$1 = {
version = 1,
action_flag = 0,
relevant_entry = 0x0,
first_entry = 0x0
}
If declaring this variable "static" is not appropriate,
then the comment saying that static initialization is desired
should be changed.
[Qemu-devel] [PATCH 3/9] alpha-dis: remove unused global; declare others to be static, Jim Meyering, 2012/05/21
[Qemu-devel] [PATCH 3/9] alpha-dis: remove unused global; declare others to be static, Jim Meyering, 2012/05/21
- [Qemu-devel] [PATCH 6/9] sheepdog: declare bdrv_sheepdog to be static, Jim Meyering, 2012/05/21
- [Qemu-devel] [PATCH 5/9] ccid: make backend_enum_table "static const" and adjust users, Jim Meyering, 2012/05/21
- [Qemu-devel] [PATCH 4/9] linux-user: arg_table need not have global scope, Jim Meyering, 2012/05/21
- [Qemu-devel] [PATCH 7/9] mips-dis: declare four globals to be "static", Jim Meyering, 2012/05/21
- [Qemu-devel] [PATCH 8/9] bonito: declare bonito_state to be static, Jim Meyering, 2012/05/21
- [Qemu-devel] [PATCH 9/9] convert many more globals to static, Jim Meyering, 2012/05/21