From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28156 invoked by alias); 20 Sep 2002 15:02:16 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28143 invoked from network); 20 Sep 2002 15:02:15 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 20 Sep 2002 15:02:15 -0000 Received: from redhat.com (tooth.toronto.redhat.com [172.16.14.29]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 05924B8831; Fri, 20 Sep 2002 11:02:15 -0400 (EDT) Message-ID: <3D8B3825.2070605@redhat.com> Date: Fri, 20 Sep 2002 08:02:00 -0000 From: Fernando Nasser Organization: Red Hat Canada User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Fernando Nasser Cc: gdb-patches@sources.redhat.com Subject: Re: RFC: CLI clenup and edit command References: <3D82489E.3080203@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00519.txt.bz2 Checked the clean-up part in. The edit command going in now... 2002-09-20 Fernando Nasser * source.c: Make global variables current_source_symtab and current_source_line static. (list_command): Moved to cli/cli-cmds.c. (ambiguous_line_spec): Moved to cli/cli-cmds.c. (get_first_line_listed): New accessor function. (get_lines_to_list): New accessor function. (get_current_source_symtab_and_line): New function. Retrieves the position in the source code that we consider current. (get_current_or_default_source_symtab_and_line): New function. Like the above but attempts to determine a default position if one is not currently defined. (set_current_source_symtab_and_line): New function. Sets the source code position considered current and returns the previously set one. (clear_current_source_symtab_and_line): Reset stored information about a current source line. (_initialize_source): Remove registration for the "list" command and its alias. * source.h: Add declarations for the new functions above. * symtab.h: Remove declarations for the global variables mentioned above. * breakpoint.c (parse_breakpoint_sals): Use accessor functions to obtain current source line. * linespec.c (decode_line_1): Ditto. * macroscope.c (default_macro_scope): Ditto. * scm-lang.c (scm_unpac): Ditto. * stack.c (print_frame_info_base): Ditto. * symfile.c (clear_symtab_users): Ditto. * symtab.c (decode_line_spec): Ditto. * cli/cli-cmds.c (list_command): Moved here from source.c. (ambiguous_line_spec): Moved here from source.c. (_init_cli_cmds): Add definition for "list" and its alias. * Makefile.in: Update dependencies. -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9