This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: insight rename patch
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: Grace Sainsbury <graces at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 4 Sep 2002 17:45:29 -0400
- Subject: Re: insight rename patch
- References: <20020904173728.A11943@tomago.toronto.redhat.com>
Grace Sainsbury writes:
> Here is the patch modified as suggested.
>
> ok to commit?
A few comments below on the main/top files.
>
> grace
>
> 2002-09-04 Grace Sainsbury <graces@redhat.com>
>
> * top.c: Set use_windows to default to zero.
> * main.c: Move main function to insight.c, gdb.c
> (gdb_main): New function.
> * main.h: New file.
> * insight.c: New File.
> * gdb.c: New File.
> * Makefile.in: Add rules for gdb.o, insight.o and
> * insight. Change
> gdbtk-install, gdbtk-uninstall, and GDBTK_ALL to reflect this.
> Index: main.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/main.c,v
> retrieving revision 1.18
> diff -u -r1.18 main.c
> --- main.c 25 Jun 2002 05:35:16 -0000 1.18
> +++ main.c 4 Sep 2002 21:36:21 -0000
> @@ -112,6 +112,7 @@
> {
> int argc;
> char **argv;
> + int use_windows;
> };
>
There should only be one of struct captured_main_args, in main.h.
> static int
> @@ -735,11 +736,9 @@
> }
>
> int
> -main (int argc, char **argv)
> +gdb_main (struct captured_main_args *args)
> {
> - struct captured_main_args args;
> - args.argc = argc;
> - args.argv = argv;
> + use_windows = args->use_windows;
> catch_errors (captured_main, &args, "", RETURN_MASK_ALL);
> return 0;
> }
> Index: main.h
> ===================================================================
> RCS file: main.h
> diff -N main.h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ main.h 4 Sep 2002 21:36:21 -0000
> @@ -0,0 +1,13 @@
> +#ifndef MAIN_H
> +#define MAIN_H
> +
> +struct captured_main_args
> +{
> + int argc;
> + char **argv;
> + int use_windows;
> +};
> +
> +int gdb_main (struct captured_main_args *);
Should have the 'extern' keyword here.
> +
> +#endif
> Index: top.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/top.c,v
> retrieving revision 1.66
> diff -u -r1.66 top.c
> --- top.c 18 Aug 2002 12:39:03 -0000 1.66
> +++ top.c 4 Sep 2002 21:36:22 -0000
> @@ -82,7 +82,7 @@
> /* If nonzero, and GDB has been configured to be able to use windows,
> attempt to open them upon startup. */
>
> -int use_windows = 1;
> +int use_windows = 0;
>
> extern char lang_frame_mismatch_warn[]; /* language.c */
>
OK
Elena