From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4034 invoked by alias); 8 Apr 2011 23:35:30 -0000 Received: (qmail 3956 invoked by uid 22791); 8 Apr 2011 23:35:28 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BT,TW_CP,TW_DB,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Apr 2011 23:35:18 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p38NZGF4028331 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Apr 2011 19:35:16 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p38NZEM0005618 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 8 Apr 2011 19:35:15 -0400 Message-ID: <4D9F9BB2.1070904@redhat.com> Date: Fri, 08 Apr 2011 23:35:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.38.b3pre.fc13 Lightning/1.0b3pre Thunderbird/3.1.9 MIME-Version: 1.0 To: insight CC: teawater@gmail.com Subject: [PATCH] Rotate ChangeLog, fix build issues Content-Type: multipart/mixed; boundary="------------020604090700050700010903" X-IsSubscribed: yes Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2011-q2/txt/msg00000.txt.bz2 This is a multi-part message in MIME format. --------------020604090700050700010903 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1000 Hi, Now that I have something to commit, it is time to rotate the ChangeLog for the year... I've committed the attached patch, which should fix all the build problems that have been reported. Additionally, this should fix a crashing problem that I discovered (some time ago) in the register window. If there are any problems, please let me know. Keith ChangeLog 2011-04-08 Keith Seitz * generic/gdbtk-bp.c (tracepoint_exists): Update for decode_line_1 API change. * generic/gdbtk-cmds.c (gdb_eval): Use comman_val_print instead of val_print. (gdb_get_line_command): Update for decode_line_1 API changes. (gdb_get_file_command): Likewise. (gdb_get_function_command): Likewise. * generic/gdbtk-register.c (get_register_types): Use get_frame_register_value instead of frame_register. (get_register): Pass valid VALUE to val_print. Consolidate calls to get_current_gdbarch. * generic/gdbtk-stack.c (gdb_get_vars_command): Update for decode_line_1 API change. --------------020604090700050700010903 Content-Type: text/plain; name="insight-gdb-api-updates.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="insight-gdb-api-updates.patch" Content-length: 7973 Index: gdbtk-bp.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-bp.c,v retrieving revision 1.38 diff -u -p -r1.38 gdbtk-bp.c --- gdbtk-bp.c 13 Nov 2010 23:23:46 -0000 1.38 +++ gdbtk-bp.c 8 Apr 2011 23:25:01 -0000 @@ -1,5 +1,6 @@ /* Tcl/Tk command definitions for Insight - Breakpoints. - Copyright (C) 2001, 2002, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2008, 2009, 2010, 2011 + Free Software Foundation, Inc. This file is part of GDB. @@ -826,12 +827,11 @@ tracepoint_exists (char *args) VEC(breakpoint_p) *tp_vec = NULL; int ix; struct breakpoint *tp; - char **canonical; struct symtabs_and_lines sals; char *file = NULL; int result = -1; - sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL); + sals = decode_line_1 (&args, 1, NULL, 0, NULL, NULL); if (sals.nelts == 1) { resolve_sal_pc (&sals.sals[0]); Index: gdbtk-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v retrieving revision 1.118 diff -u -p -r1.118 gdbtk-cmds.c --- gdbtk-cmds.c 18 Jun 2010 22:25:26 -0000 1.118 +++ gdbtk-cmds.c 8 Apr 2011 23:25:01 -0000 @@ -1,5 +1,6 @@ /* Tcl/Tk command definitions for Insight. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2007, 2008, 2010 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, + 2007, 2008, 2010, 2011 Free Software Foundation, Inc. Written by Stu Grossman of Cygnus Support. @@ -652,9 +653,7 @@ gdb_eval (ClientData clientData, Tcl_Int /* "Print" the result of the expression evaluation. */ stb = mem_fileopen (); make_cleanup_ui_file_delete (stb); - val_print (value_type (val), value_contents (val), - value_embedded_offset (val), value_address (val), - stb, 0, val, &opts, current_language); + common_val_print (val, stb, 0, &opts, current_language); result = ui_file_xstrdup (stb, &dummy); Tcl_SetObjResult (interp, Tcl_NewStringObj (result, -1)); xfree (result); @@ -953,7 +952,7 @@ gdb_get_line_command (ClientData clientD int objc, Tcl_Obj *CONST objv[]) { struct symtabs_and_lines sals; - char *args, **canonical; + char *args; if (objc != 2) { @@ -962,7 +961,7 @@ gdb_get_line_command (ClientData clientD } args = Tcl_GetStringFromObj (objv[1], NULL); - sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL); + sals = decode_line_1 (&args, 1, NULL, 0, NULL, NULL); if (sals.nelts == 1) { Tcl_SetIntObj (result_ptr->obj_ptr, sals.sals[0].line); @@ -989,7 +988,7 @@ gdb_get_file_command (ClientData clientD int objc, Tcl_Obj *CONST objv[]) { struct symtabs_and_lines sals; - char *args, **canonical; + char *args; if (objc != 2) { @@ -998,7 +997,7 @@ gdb_get_file_command (ClientData clientD } args = Tcl_GetStringFromObj (objv[1], NULL); - sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL); + sals = decode_line_1 (&args, 1, NULL, 0, NULL, NULL); if (sals.nelts == 1) { Tcl_SetStringObj (result_ptr->obj_ptr, @@ -1025,7 +1024,7 @@ gdb_get_function_command (ClientData cli { char *function; struct symtabs_and_lines sals; - char *args, **canonical; + char *args; if (objc != 2) { @@ -1034,7 +1033,7 @@ gdb_get_function_command (ClientData cli } args = Tcl_GetStringFromObj (objv[1], NULL); - sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL); + sals = decode_line_1 (&args, 1, NULL, 0, NULL, NULL); if (sals.nelts == 1) { resolve_sal_pc (&sals.sals[0]); Index: gdbtk-register.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-register.c,v retrieving revision 1.39 diff -u -p -r1.39 gdbtk-register.c --- gdbtk-register.c 18 Jun 2010 22:25:26 -0000 1.39 +++ gdbtk-register.c 8 Apr 2011 23:25:01 -0000 @@ -1,5 +1,6 @@ /* Tcl/Tk command definitions for Insight - Registers - Copyright (C) 2001, 2002, 2004, 2007 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2004, 2007, 2010, 2011 + Free Software Foundation, Inc. This file is part of GDB. @@ -272,17 +273,19 @@ get_register_types (int regnum, map_arg static void get_register (int regnum, map_arg arg) { - int realnum; CORE_ADDR addr; enum lval_type lval; struct type *reg_vtype; gdb_byte buffer[MAX_REGISTER_SIZE]; - int optim, format; + int format; struct cleanup *old_chain = NULL; struct ui_file *stb; long dummy; char *res; - + struct gdbarch *gdbarch; + struct value *val; + struct frame_info *frame; + format = regformat[regnum]; if (format == 0) format = 'x'; @@ -300,10 +303,11 @@ get_register (int regnum, map_arg arg) return; } - frame_register (get_selected_frame (NULL), regnum, &optim, &lval, - &addr, &realnum, buffer); + frame = get_selected_frame (NULL); + gdbarch = get_frame_arch (frame); + val = get_frame_register_value (frame, regnum); - if (optim) + if (value_optimized_out (val)) { Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewStringObj ("Optimized out", -1)); @@ -318,13 +322,14 @@ get_register (int regnum, map_arg arg) /* shouldn't happen. raw format is deprecated */ int j; char *ptr, buf[1024]; + const gdb_byte *valaddr = value_contents_for_printing (val); strcpy (buf, "0x"); ptr = buf + 2; - for (j = 0; j < register_size (get_current_arch (), regnum); j++) + for (j = 0; j < register_size (gdbarch, regnum); j++) { - int idx = ((gdbarch_byte_order (get_current_arch ()) == BFD_ENDIAN_BIG) - ? j : register_size (get_current_arch (), regnum) - 1 - j); + int idx = ((gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) + ? j : register_size (gdbarch, regnum) - 1 - j); sprintf (ptr, "%02x", (unsigned char) buffer[idx]); ptr += 2; } @@ -337,17 +342,9 @@ get_register (int regnum, map_arg arg) get_formatted_print_options (&opts, format); opts.deref_ref = 1; opts.pretty = Val_pretty_default; - - if ((TYPE_CODE (reg_vtype) == TYPE_CODE_UNION) - && (strcmp (FIELD_NAME (TYPE_FIELD (reg_vtype, 0)), - gdbarch_register_name (get_current_arch (), regnum)) == 0)) - { - val_print (FIELD_TYPE (TYPE_FIELD (reg_vtype, 0)), buffer, 0, 0, - stb, 0, NULL, &opts, current_language); - } - else - val_print (reg_vtype, buffer, 0, 0, - stb, 0, NULL, &opts, current_language); + val_print (reg_vtype, value_contents_for_printing (val), + value_embedded_offset (val), 0, + stb, 0, val, &opts, current_language); } res = ui_file_xstrdup (stb, &dummy); Index: gdbtk-stack.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-stack.c,v retrieving revision 1.34 diff -u -p -r1.34 gdbtk-stack.c --- gdbtk-stack.c 7 Jul 2009 12:38:56 -0000 1.34 +++ gdbtk-stack.c 8 Apr 2011 23:25:01 -0000 @@ -1,5 +1,6 @@ /* Tcl/Tk command definitions for Insight - Stack. - Copyright (C) 2001, 2002, 2003, 2008 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2008, 2011 + Free Software Foundation, Inc. This file is part of GDB. @@ -277,7 +278,7 @@ gdb_get_vars_command (ClientData clientD struct symtabs_and_lines sals; struct symbol *sym; struct block *block; - char **canonical, *args; + char *args; struct dict_iterator iter; int i, arguments; @@ -297,7 +298,7 @@ gdb_get_vars_command (ClientData clientD if (objc == 2) { args = Tcl_GetStringFromObj (objv[1], NULL); - sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL); + sals = decode_line_1 (&args, 1, NULL, 0, NULL, NULL); if (sals.nelts == 0) { gdbtk_set_result (interp, "error decoding line"); --------------020604090700050700010903--