From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15764 invoked by alias); 10 Dec 2008 21:18:03 -0000 Received: (qmail 15742 invoked by uid 71); 10 Dec 2008 21:18:02 -0000 Date: Wed, 10 Dec 2008 21:18:00 -0000 Message-ID: <20081210211802.15740.qmail@sourceware.org> To: nobody@sources.redhat.com Cc: gdb-prs@sources.redhat.com, From: Pedro Alves Subject: Re: macros/2564: 'p siginfo->si_addr' doesn't work anymore Reply-To: Pedro Alves Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2008-q4/txt/msg00075.txt.bz2 The following reply was made to PR macros/2564; it has been noted by GNATS. From: Pedro Alves To: Tom Tromey Cc: gdb-gnats@sources.redhat.com, nobody@sources.redhat.com, gdb-prs@sources.redhat.com Subject: Re: macros/2564: 'p siginfo->si_addr' doesn't work anymore Date: Wed, 10 Dec 2008 21:13:57 +0000 Hmmm, weird. I'm trying on pristine sources from today. (gdb) set debug expression 1 (gdb) p siginfo.si_addr Dump of expression @ 0xdd0520' Language c, 19 elements, 16 bytes each. Index Opcode Hex Value String Value 0 OP_VAR_VALUE 44 ,............... 1 OP_NULL 0 ................ 2 12531280 P6.............. 3 OP_VAR_VALUE 44 ,............... 4 STRUCTOP_STRUCT 87 W............... 5 BINOP_LOGICAL_AND 9 ................ 6 7236270204641702751 _sifields....... 7 BINOP_LOGICAL_AND 9 ................ 8 STRUCTOP_STRUCT 87 W............... 9 STRUCTOP_STRUCT 87 W............... 10 BINOP_LOGICAL_AND 9 ................ 11 7815259820820886367 _sigfault....... 12 BINOP_LOGICAL_AND 9 ................ 13 STRUCTOP_STRUCT 87 W............... 14 STRUCTOP_STRUCT 87 W............... 15 BINOP_LSH 7 ................ 16 OP_NULL 25263822268792832 ....P.Y......... 17 BINOP_LSH 7 ................ 18 STRUCTOP_STRUCT 87 W............... Dump of expression @ 0xdd0520, after conversion to prefix form: Expression: `siginfo._sifields._sigfault.' Language c, 19 elements, 16 bytes each. 0 STRUCTOP_STRUCT Element name: `' 5 STRUCTOP_STRUCT Element name: `_sigfault' 10 STRUCTOP_STRUCT Element name: `_sifields' 15 OP_VAR_VALUE Block @0x0, symbol @0xbf3650 (siginfo) There is no member named . (gdb) Hmmm, I just noticed that if I try enough times, it sometimes succeeds, which brings us to Valgrind: (gdb) p siginfo_p->si_addr ==18963== ==18963== Invalid read of size 1 ==18963== at 0x4C250A8: memcpy (mc_replace_strmem.c:402) ==18963== by 0x546B36: write_exp_string (parse.c:349) ==18963== by 0x5E2F94: c_parse_internal (c-exp.y:338) ==18963== by 0x5E62FD: c_parse (c-exp.y:1908) ==18963== by 0x5951C4: c_preprocess_and_parse (c-lang.c:286) ==18963== by 0x547B4B: parse_exp_in_context (parse.c:1034) ==18963== by 0x547993: parse_exp_1 (parse.c:972) ==18963== by 0x547C82: parse_expression (parse.c:1084) ==18963== by 0x4EFE36: print_command_1 (printcmd.c:871) ==18963== by 0x4EFFCB: print_command (printcmd.c:921) ==18963== by 0x49DA8B: do_cfunc (cli-decode.c:63) ==18963== by 0x4A06F6: cmd_func (cli-decode.c:1700) ==18963== Address 0x7c583f2 is 26 bytes inside a block of size 36 free'd ==18963== at 0x4C22B2E: free (vg_replace_malloc.c:323) ==18963== by 0x45BC31: xfree (utils.c:1151) ==18963== by 0x595098: finished_macro_expansion (c-lang.c:246) ==18963== by 0x5E5379: c_lex (c-exp.y:1475) ==18963== by 0x5E2B2A: c_parse_internal (c-exp.c.tmp:1785) ==18963== by 0x5E62FD: c_parse (c-exp.y:1908) ==18963== by 0x5951C4: c_preprocess_and_parse (c-lang.c:286) ==18963== by 0x547B4B: parse_exp_in_context (parse.c:1034) ==18963== by 0x547993: parse_exp_1 (parse.c:972) ==18963== by 0x547C82: parse_expression (parse.c:1084) ==18963== by 0x4EFE36: print_command_1 (printcmd.c:871) ==18963== by 0x4EFFCB: print_command (printcmd.c:921) ==18963== ==18963== Invalid read of size 1 ==18963== at 0x4C250B1: memcpy (mc_replace_strmem.c:402) ==18963== by 0x546B36: write_exp_string (parse.c:349) ==18963== by 0x5E2F94: c_parse_internal (c-exp.y:338) ==18963== by 0x5E62FD: c_parse (c-exp.y:1908) ==18963== by 0x5951C4: c_preprocess_and_parse (c-lang.c:286) ==18963== by 0x547B4B: parse_exp_in_context (parse.c:1034) ==18963== by 0x547993: parse_exp_1 (parse.c:972) ==18963== by 0x547C82: parse_expression (parse.c:1084) ==18963== by 0x4EFE36: print_command_1 (printcmd.c:871) ==18963== by 0x4EFFCB: print_command (printcmd.c:921) ==18963== by 0x49DA8B: do_cfunc (cli-decode.c:63) ==18963== by 0x4A06F6: cmd_func (cli-decode.c:1700) ==18963== Address 0x7c583f1 is 25 bytes inside a block of size 36 free'd ==18963== at 0x4C22B2E: free (vg_replace_malloc.c:323) ==18963== by 0x45BC31: xfree (utils.c:1151) ==18963== by 0x595098: finished_macro_expansion (c-lang.c:246) ==18963== by 0x5E5379: c_lex (c-exp.y:1475) ==18963== by 0x5E2B2A: c_parse_internal (c-exp.c.tmp:1785) ==18963== by 0x5E62FD: c_parse (c-exp.y:1908) ==18963== by 0x5951C4: c_preprocess_and_parse (c-lang.c:286) ==18963== by 0x547B4B: parse_exp_in_context (parse.c:1034) ==18963== by 0x547993: parse_exp_1 (parse.c:972) ==18963== by 0x547C82: parse_expression (parse.c:1084) ==18963== by 0x4EFE36: print_command_1 (printcmd.c:871) ==18963== by 0x4EFFCB: print_command (printcmd.c:921) ==18963== ==18963== Invalid read of size 1 ==18963== at 0x4C250B8: memcpy (mc_replace_strmem.c:402) ==18963== by 0x546B36: write_exp_string (parse.c:349) ==18963== by 0x5E2F94: c_parse_internal (c-exp.y:338) ==18963== by 0x5E62FD: c_parse (c-exp.y:1908) ==18963== by 0x5951C4: c_preprocess_and_parse (c-lang.c:286) ==18963== by 0x547B4B: parse_exp_in_context (parse.c:1034) ==18963== by 0x547993: parse_exp_1 (parse.c:972) ==18963== by 0x547C82: parse_expression (parse.c:1084) ==18963== by 0x4EFE36: print_command_1 (printcmd.c:871) ==18963== by 0x4EFFCB: print_command (printcmd.c:921) ==18963== by 0x49DA8B: do_cfunc (cli-decode.c:63) ==18963== by 0x4A06F6: cmd_func (cli-decode.c:1700) ==18963== Address 0x7c583f0 is 24 bytes inside a block of size 36 free'd ==18963== at 0x4C22B2E: free (vg_replace_malloc.c:323) ==18963== by 0x45BC31: xfree (utils.c:1151) ==18963== by 0x595098: finished_macro_expansion (c-lang.c:246) ==18963== by 0x5E5379: c_lex (c-exp.y:1475) ==18963== by 0x5E2B2A: c_parse_internal (c-exp.c.tmp:1785) ==18963== by 0x5E62FD: c_parse (c-exp.y:1908) ==18963== by 0x5951C4: c_preprocess_and_parse (c-lang.c:286) ==18963== by 0x547B4B: parse_exp_in_context (parse.c:1034) ==18963== by 0x547993: parse_exp_1 (parse.c:972) ==18963== by 0x547C82: parse_expression (parse.c:1084) ==18963== by 0x4EFE36: print_command_1 (printcmd.c:871) ==18963== by 0x4EFFCB: print_command (printcmd.c:921) ==18963== ==18963== Invalid read of size 1 ==18963== at 0x4C250BF: memcpy (mc_replace_strmem.c:402) ==18963== by 0x546B36: write_exp_string (parse.c:349) ==18963== by 0x5E2F94: c_parse_internal (c-exp.y:338) ==18963== by 0x5E62FD: c_parse (c-exp.y:1908) ==18963== by 0x5951C4: c_preprocess_and_parse (c-lang.c:286) ==18963== by 0x547B4B: parse_exp_in_context (parse.c:1034) ==18963== by 0x547993: parse_exp_1 (parse.c:972) ==18963== by 0x547C82: parse_expression (parse.c:1084) ==18963== by 0x4EFE36: print_command_1 (printcmd.c:871) ==18963== by 0x4EFFCB: print_command (printcmd.c:921) ==18963== by 0x49DA8B: do_cfunc (cli-decode.c:63) ==18963== by 0x4A06F6: cmd_func (cli-decode.c:1700) ==18963== Address 0x7c583ef is 23 bytes inside a block of size 36 free'd ==18963== at 0x4C22B2E: free (vg_replace_malloc.c:323) ==18963== by 0x45BC31: xfree (utils.c:1151) ==18963== by 0x595098: finished_macro_expansion (c-lang.c:246) ==18963== by 0x5E5379: c_lex (c-exp.y:1475) ==18963== by 0x5E2B2A: c_parse_internal (c-exp.c.tmp:1785) ==18963== by 0x5E62FD: c_parse (c-exp.y:1908) ==18963== by 0x5951C4: c_preprocess_and_parse (c-lang.c:286) ==18963== by 0x547B4B: parse_exp_in_context (parse.c:1034) ==18963== by 0x547993: parse_exp_1 (parse.c:972) ==18963== by 0x547C82: parse_expression (parse.c:1084) ==18963== by 0x4EFE36: print_command_1 (printcmd.c:871) ==18963== by 0x4EFFCB: print_command (printcmd.c:921) ==18963== ==18963== Invalid read of size 1 ==18963== at 0x4C250E0: memcpy (mc_replace_strmem.c:402) ==18963== by 0x546B36: write_exp_string (parse.c:349) ==18963== by 0x5E2F94: c_parse_internal (c-exp.y:338) ==18963== by 0x5E62FD: c_parse (c-exp.y:1908) ==18963== by 0x5951C4: c_preprocess_and_parse (c-lang.c:286) ==18963== by 0x547B4B: parse_exp_in_context (parse.c:1034) ==18963== by 0x547993: parse_exp_1 (parse.c:972) ==18963== by 0x547C82: parse_expression (parse.c:1084) ==18963== by 0x4EFE36: print_command_1 (printcmd.c:871) ==18963== by 0x4EFFCB: print_command (printcmd.c:921) ==18963== by 0x49DA8B: do_cfunc (cli-decode.c:63) ==18963== by 0x4A06F6: cmd_func (cli-decode.c:1700) ==18963== Address 0x7c583ee is 22 bytes inside a block of size 36 free'd ==18963== at 0x4C22B2E: free (vg_replace_malloc.c:323) ==18963== by 0x45BC31: xfree (utils.c:1151) ==18963== by 0x595098: finished_macro_expansion (c-lang.c:246) ==18963== by 0x5E5379: c_lex (c-exp.y:1475) ==18963== by 0x5E2B2A: c_parse_internal (c-exp.c.tmp:1785) ==18963== by 0x5E62FD: c_parse (c-exp.y:1908) ==18963== by 0x5951C4: c_preprocess_and_parse (c-lang.c:286) ==18963== by 0x547B4B: parse_exp_in_context (parse.c:1034) ==18963== by 0x547993: parse_exp_1 (parse.c:972) ==18963== by 0x547C82: parse_expression (parse.c:1084) ==18963== by 0x4EFE36: print_command_1 (printcmd.c:871) ==18963== by 0x4EFFCB: print_command (printcmd.c:921) ==18963== ==18963== Invalid read of size 1 ==18963== at 0x4C250F0: memcpy (mc_replace_strmem.c:402) ==18963== by 0x546B36: write_exp_string (parse.c:349) ==18963== by 0x5E2F94: c_parse_internal (c-exp.y:338) ==18963== by 0x5E62FD: c_parse (c-exp.y:1908) ==18963== by 0x5951C4: c_preprocess_and_parse (c-lang.c:286) ==18963== by 0x547B4B: parse_exp_in_context (parse.c:1034) ==18963== by 0x547993: parse_exp_1 (parse.c:972) ==18963== by 0x547C82: parse_expression (parse.c:1084) ==18963== by 0x4EFE36: print_command_1 (printcmd.c:871) ==18963== by 0x4EFFCB: print_command (printcmd.c:921) ==18963== by 0x49DA8B: do_cfunc (cli-decode.c:63) ==18963== by 0x4A06F6: cmd_func (cli-decode.c:1700) ==18963== Address 0x7c583ec is 20 bytes inside a block of size 36 free'd ==18963== at 0x4C22B2E: free (vg_replace_malloc.c:323) ==18963== by 0x45BC31: xfree (utils.c:1151) ==18963== by 0x595098: finished_macro_expansion (c-lang.c:246) ==18963== by 0x5E5379: c_lex (c-exp.y:1475) ==18963== by 0x5E2B2A: c_parse_internal (c-exp.c.tmp:1785) ==18963== by 0x5E62FD: c_parse (c-exp.y:1908) ==18963== by 0x5951C4: c_preprocess_and_parse (c-lang.c:286) ==18963== by 0x547B4B: parse_exp_in_context (parse.c:1034) ==18963== by 0x547993: parse_exp_1 (parse.c:972) ==18963== by 0x547C82: parse_expression (parse.c:1084) ==18963== by 0x4EFE36: print_command_1 (printcmd.c:871) ==18963== by 0x4EFFCB: print_command (printcmd.c:921) $1 = (void *) 0x1 (gdb) -- Pedro Alves