From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27011 invoked by alias); 17 Dec 2011 19:32:05 -0000 Received: (qmail 27001 invoked by uid 22791); 17 Dec 2011 19:32:04 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_BT,TW_DB 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; Sat, 17 Dec 2011 19:31:48 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBHJVmU8010816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 17 Dec 2011 14:31:48 -0500 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pBHJVjj7026694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 17 Dec 2011 14:31:47 -0500 Message-ID: <4EECEE21.40500@redhat.com> Date: Sat, 17 Dec 2011 19:32:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: insight Subject: [PATCH] GDB API Updates Content-Type: multipart/mixed; boundary="------------020300050504070708080905" 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-q4/txt/msg00025.txt.bz2 This is a multi-part message in MIME format. --------------020300050504070708080905 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 685 Hi, GDB has once again been undergoing some churn with API changes to several functions. This patch should get things working again. Please let me know if there are any problems. Keith ChangeLog 2011-12-17 Keith Seitz * generic/gdbtk-cmds.c (gdb_listfiles): Update API changes for map_partial_symbol_filenames. (gdb_get_line_command): Update API changes for decode_line_1 in gdb. (gdb_get_file_command): Likewise. (gdb_get_function_command): Likewise. * generic/gdbtk-stack.c (gdb_get_vars_command): Likewise. * generic/gdbtk-bp.c (tracepoint_exists): Likewise. (gdb_find_bp_at_line, gdb_get_breakpoint_info): Update breakpoint API changes in gdb. --------------020300050504070708080905 Content-Type: text/x-patch; name="api-updates.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="api-updates.patch" Content-length: 3799 Index: generic/gdbtk-bp.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-bp.c,v retrieving revision 1.43 diff -u -p -r1.43 gdbtk-bp.c --- generic/gdbtk-bp.c 2 Aug 2011 18:05:23 -0000 1.43 +++ generic/gdbtk-bp.c 17 Dec 2011 19:27:58 -0000 @@ -254,7 +254,8 @@ gdb_find_bp_at_line (ClientData clientDa Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL); ALL_BREAKPOINTS (b) { - if (b->line_number == line && !strcmp (b->source_file, s->filename)) + if (b->loc->line_number == line + && !strcmp (b->loc->source_file, s->filename)) { Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewIntObj (b->number)); @@ -336,7 +337,7 @@ gdb_get_breakpoint_info (ClientData clie Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewStringObj (funcname, -1)); Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, - Tcl_NewIntObj (b->line_number)); + Tcl_NewIntObj (b->loc->line_number)); Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewStringObj (core_addr_to_string (b->loc->address), -1)); @@ -801,7 +802,7 @@ tracepoint_exists (char *args) char *file = NULL; int result = -1; - sals = decode_line_1 (&args, 1, NULL, 0, NULL); + sals = decode_line_1 (&args, DECODE_LINE_FUNFIRSTLINE, NULL, 0); if (sals.nelts == 1) { resolve_sal_pc (&sals.sals[0]); Index: generic/gdbtk-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v retrieving revision 1.122 diff -u -p -r1.122 gdbtk-cmds.c --- generic/gdbtk-cmds.c 11 Sep 2011 16:33:32 -0000 1.122 +++ generic/gdbtk-cmds.c 17 Dec 2011 19:27:59 -0000 @@ -960,7 +960,7 @@ gdb_get_line_command (ClientData clientD } args = Tcl_GetStringFromObj (objv[1], NULL); - sals = decode_line_1 (&args, 1, NULL, 0, NULL); + sals = decode_line_1 (&args, DECODE_LINE_FUNFIRSTLINE, NULL, 0); if (sals.nelts == 1) { Tcl_SetIntObj (result_ptr->obj_ptr, sals.sals[0].line); @@ -996,7 +996,7 @@ gdb_get_file_command (ClientData clientD } args = Tcl_GetStringFromObj (objv[1], NULL); - sals = decode_line_1 (&args, 1, NULL, 0, NULL); + sals = decode_line_1 (&args, DECODE_LINE_FUNFIRSTLINE, NULL, 0); if (sals.nelts == 1) { Tcl_SetStringObj (result_ptr->obj_ptr, @@ -1032,7 +1032,7 @@ gdb_get_function_command (ClientData cli } args = Tcl_GetStringFromObj (objv[1], NULL); - sals = decode_line_1 (&args, 1, NULL, 0, NULL); + sals = decode_line_1 (&args, DECODE_LINE_FUNFIRSTLINE, NULL, 0); if (sals.nelts == 1) { resolve_sal_pc (&sals.sals[0]); @@ -1200,7 +1200,7 @@ gdb_listfiles (ClientData clientData, Tc info.filesp = &files; info.len = len; info.pathname = pathname; - map_partial_symbol_filenames (do_listfiles, &info); + map_partial_symbol_filenames (do_listfiles, &info, 0); ALL_SYMTABS (objfile, symtab) { Index: generic/gdbtk-stack.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-stack.c,v retrieving revision 1.36 diff -u -p -r1.36 gdbtk-stack.c --- generic/gdbtk-stack.c 12 Apr 2011 05:11:08 -0000 1.36 +++ generic/gdbtk-stack.c 17 Dec 2011 19:27:59 -0000 @@ -298,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, NULL); + sals = decode_line_1 (&args, DECODE_LINE_FUNFIRSTLINE, NULL, 0); if (sals.nelts == 0) { gdbtk_set_result (interp, "error decoding line"); --------------020300050504070708080905--