public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com> To: nobody@sources.redhat.com Cc: gdb-prs@sources.redhat.com, Subject: Re: macros/2564: 'p siginfo->si_addr' doesn't work anymore Date: Wed, 10 Dec 2008 21:18:00 -0000 [thread overview] Message-ID: <20081210211802.15740.qmail@sourceware.org> (raw) The following reply was made to PR macros/2564; it has been noted by GNATS. From: Pedro Alves <pedro@codesourcery.com> To: Tom Tromey <tromey@redhat.com> 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 <unknown 12531280> 12531280 P6.............. 3 OP_VAR_VALUE 44 ,............... 4 STRUCTOP_STRUCT 87 W............... 5 BINOP_LOGICAL_AND 9 ................ 6 <unknown 1718186847> 7236270204641702751 _sifields....... 7 BINOP_LOGICAL_AND 9 ................ 8 STRUCTOP_STRUCT 87 W............... 9 STRUCTOP_STRUCT 87 W............... 10 BINOP_LOGICAL_AND 9 ................ 11 <unknown 1734964063> 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
next reply other threads:[~2008-12-10 21:18 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-12-10 21:18 Pedro Alves [this message] -- strict thread matches above, loose matches on Subject: below -- 2008-12-11 18:31 tromey 2008-12-11 1:14 tromey 2008-12-10 19:28 Tom Tromey 2008-12-10 16:58 Pedro Alves 2008-12-10 15:48 pedro
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20081210211802.15740.qmail@sourceware.org \ --to=pedro@codesourcery.com \ --cc=gdb-prs@sources.redhat.com \ --cc=nobody@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).