From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1281 invoked by alias); 13 Sep 2002 20:26:59 -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 1274 invoked from network); 13 Sep 2002 20:26:58 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 13 Sep 2002 20:26:58 -0000 Received: from redhat.com (tooth.toronto.redhat.com [172.16.14.29]) by touchme.toronto.redhat.com (Postfix) with ESMTP id D06D1B8831; Fri, 13 Sep 2002 16:26:56 -0400 (EDT) Message-ID: <3D8249C8.2090705@redhat.com> Date: Fri, 13 Sep 2002 13:26: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/msg00270.txt.bz2 Of course, the ChangeLog entries help :-) Sorry. Here they are. For the clean-up: 2002-09-13 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. For the edit command: 2002-09-13 Fernando Nasser From 2002-07-02 George Helffrich * cli/cli-cmds.c (list_command): New function. Implements the new cli edit command. (_init_cli_cmds): Add new command definition. -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9