From: gkm@cygnus.com (glen mccready)
To: gdb-patches@sourceware.cygnus.com
Subject: RFA: sim/arm/wrapper.c fix
Date: Wed, 22 Mar 2000 13:18:00 -0000 [thread overview]
Message-ID: <200003222117.NAA04078@cygint.cygnus.com> (raw)
Message-ID: <20000322131800.FzCNlI6eVuXvtJV-lCWZs3AWVrKCs8P80iGP8uddMOU@z> (raw)
[Sorry about the first message; misfired.]
Error messages that used `myname' were coming out garbled when
the memory it pointed to got freed too early.
Index: ChangeLog
===================================================================
RCS file: /cvs/cvsfiles/devo/sim/arm/ChangeLog,v
retrieving revision 1.77
diff -c -b -r1.77 ChangeLog
*** ChangeLog 1998/09/14 17:04:36 1.77
- --- ChangeLog 2000/03/22 20:27:15
***************
*** 1,3 ****
- --- 1,7 ----
+ Wed Mar 22 15:24:21 2000 glen mccready <gkm@pobox.com>
+
+ * wrapper.c (sim_open,sim_close): Copy into myname, free myname
+
Mon Sep 14 09:00:05 1998 Nick Clifton <nickc@cygnus.com>
* wrapper.c (sim_open): Set endianness according to BFD or command
Index: wrapper.c
===================================================================
RCS file: /cvs/cvsfiles/devo/sim/arm/wrapper.c,v
retrieving revision 1.24
diff -c -b -r1.24 wrapper.c
*** wrapper.c 1998/09/14 17:04:36 1.24
- --- wrapper.c 2000/03/22 20:27:15
***************
*** 347,353 ****
char **argv;
{
sim_kind = kind;
! myname = argv[0];
sim_callback = ptr;
/* Decide upon the endian-ness of the processor.
- --- 347,354 ----
char **argv;
{
sim_kind = kind;
! if (myname) free(myname);
! myname = xstrdup(argv[0]);
sim_callback = ptr;
/* Decide upon the endian-ness of the processor.
***************
*** 405,411 ****
SIM_DESC sd;
int quitting;
{
! /* nothing to do */
}
SIM_RC
- --- 406,413 ----
SIM_DESC sd;
int quitting;
{
! if (myname) free(myname);
! myname = 0;
}
SIM_RC
From fnasser@redhat.com Wed Mar 22 14:02:00 2000
From: Fernando Nasser <fnasser@redhat.com>
To: Daniel Berlin <dan@cgsoftware.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [RFC] Better apropos patch
Date: Wed, 22 Mar 2000 14:02:00 -0000
Message-id: <38D9429B.798F82E2@redhat.com>
References: <Pine.LNX.4.10.10003221307320.20082-100000@propylaea.anduin.com>
X-SW-Source: 2000-03/msg00480.html
Content-length: 1043
Daniel Berlin wrote:
>
> Oh, i know it's not.
> I also have no changelog or comments.
> I wanted to make sure nobody saw anything immediately wrong with my method
> (IE Some odd thing that would make the way i search the command lists not
> work properly, or something), and that the general format of the output
> was okay.
I see. Sorry, I should have noticed that it was RFC not RFA.
Well, don't worry about some odd case. If it happens, we fix it.
Maybe the only way to get a feedback with regards to the output format
will be to incorporate it and let people use it.
This is way cool. I am looking forward to the final patch.
P.S.: Are you going to send a gdb.texinfo entry as well? It would be
nice if you do (else I would have to do it myself before checking it in
and my TODO list is approaching infinity).
--
Fernando Nasser
Red Hat, Inc. - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311
Toronto, Ontario M4P 2C9 Fax: 416-482-6299
From kevinb@cygnus.com Wed Mar 22 14:17:00 2000
From: Kevin Buettner <kevinb@cygnus.com>
To: Fernando Nasser <fnasser@redhat.com>, Daniel Berlin <dan@cgsoftware.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [RFC] Better apropos patch
Date: Wed, 22 Mar 2000 14:17:00 -0000
Message-id: <1000322221717.ZM29415@ocotillo.lan>
References: <Pine.LNX.4.10.10003221307320.20082-100000@propylaea.anduin.com> <38D9429B.798F82E2@redhat.com> <fnasser@redhat.com>
X-SW-Source: 2000-03/msg00481.html
Content-length: 355
On Mar 22, 10:00pm, Fernando Nasser wrote:
> Maybe the only way to get a feedback with regards to the output format
> will be to incorporate it and let people use it.
I think that's a good idea; I'd definitely play around with it if it were
to show up in the repository.
> This is way cool. I am looking forward to the final patch.
So am I.
Kevin
From tm@netcom.com Wed Mar 22 14:18:00 2000
From: Toshiyasu Morita <tm@netcom.com>
To: msnyder@cygnus.com (Michael Snyder)
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH]: Allow struct compare in expressions.
Date: Wed, 22 Mar 2000 14:18:00 -0000
Message-id: <200003222218.OAA02705@netcom.com>
References: <200003222043.MAA10512@cleaver.cygnus.com>
X-SW-Source: 2000-03/msg00482.html
Content-length: 4958
Does this compare ignore the padding in the struct?
>
>
> The following change allows GDB to evaluate (and set watchpoints on)
> expressions of the form (a == b) and (a != b), where a and b are
> simple C structs or unions. It would be possible to extend this
> further by allowing simple binary comparison for classes that don't
> have an operator== method: I leave that as an exercise for someone
> else.
>
> Jim Blandy, David Taylor, I think both of your approvals is required.
>
> 2000-03-22 Michael Snyder <msnyder@cleaver.cygnus.com>
>
> * eval.c (evaluate_subexp_standard): allow for simple comparison
> of structures, in the absense of C++ method symbols.
> * symtab.c (total_number_of_methods): make public, for use above.
> * symtab.h (total_number_of_methods): publish prototype.
>
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/src/src/gdb/ChangeLog,v
> retrieving revision 1.163
> diff -c -r1.163 ChangeLog
> *** ChangeLog 2000/03/22 09:45:01 1.163
> --- ChangeLog 2000/03/22 20:38:33
> ***************
> *** 1,3 ****
> --- 1,10 ----
> + 2000-03-22 Michael Snyder <msnyder@cleaver.cygnus.com>
> +
> + * eval.c (evaluate_subexp_standard): allow for simple comparison
> + of structures, in the absense of C++ method symbols.
> + * symtab.c (total_number_of_methods): make public, for use above.
> + * symtab.h (total_number_of_methods): publish prototype.
> +
> 2000-03-22 Mark Kettenis <kettenis@gnu.org>
>
> * config/i386/tm-i386aix.h (I386_AIX_TARGET): Remove.
> Index: eval.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/eval.c,v
> retrieving revision 1.2
> diff -c -r1.2 eval.c
> *** eval.c 2000/03/14 17:01:04 1.2
> --- eval.c 2000/03/22 20:38:34
> ***************
> *** 1448,1454 ****
> arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
> if (noside == EVAL_SKIP)
> goto nosideret;
> ! if (binop_user_defined_p (op, arg1, arg2))
> {
> return value_x_binop (arg1, arg2, op, OP_NULL, noside);
> }
> --- 1448,1459 ----
> arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
> if (noside == EVAL_SKIP)
> goto nosideret;
> !
> ! /* NOTE: because BINOP_EQUAL is a legal operaton for
> ! C structs (as opposed to C++ classes), revert to
> ! simple value comparison if the type has no methods. */
> ! if (binop_user_defined_p (op, arg1, arg2) &&
> ! total_number_of_methods (arg1->type) > 0)
> {
> return value_x_binop (arg1, arg2, op, OP_NULL, noside);
> }
> ***************
> *** 1463,1469 ****
> arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
> if (noside == EVAL_SKIP)
> goto nosideret;
> ! if (binop_user_defined_p (op, arg1, arg2))
> {
> return value_x_binop (arg1, arg2, op, OP_NULL, noside);
> }
> --- 1468,1479 ----
> arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
> if (noside == EVAL_SKIP)
> goto nosideret;
> !
> ! /* NOTE: because BINOP_NOTEQUAL is a legal operaton for
> ! C structs (as opposed to C++ classes), revert to
> ! simple value comparison if the type has no methods. */
> ! if (binop_user_defined_p (op, arg1, arg2) &&
> ! total_number_of_methods (arg1->type) > 0)
> {
> return value_x_binop (arg1, arg2, op, OP_NULL, noside);
> }
> Index: symtab.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/symtab.c,v
> retrieving revision 1.2
> diff -c -r1.2 symtab.c
> *** symtab.c 2000/02/08 04:39:02 1.2
> --- symtab.c 2000/03/22 20:38:34
> ***************
> *** 2217,2225 ****
> reader because the type of the baseclass might still be stubbed
> when the definition of the derived class is parsed. */
>
> ! static int total_number_of_methods PARAMS ((struct type * type));
> !
> ! static int
> total_number_of_methods (type)
> struct type *type;
> {
> --- 2217,2223 ----
> reader because the type of the baseclass might still be stubbed
> when the definition of the derived class is parsed. */
>
> ! int
> total_number_of_methods (type)
> struct type *type;
> {
> Index: symtab.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/symtab.h,v
> retrieving revision 1.4
> diff -c -r1.4 symtab.h
> *** symtab.h 2000/03/21 22:37:42 1.4
> --- symtab.h 2000/03/22 20:38:34
> ***************
> *** 1462,1467 ****
> --- 1462,1472 ----
> extern int
> in_prologue PARAMS ((CORE_ADDR pc, CORE_ADDR func_start));
>
> + /* Number of method symbols for TYPE
> + (and all its base classes) */
> + extern int
> + total_number_of_methods PARAMS ((struct type * type));
> +
> extern struct symbol *
> fixup_symbol_section PARAMS ((struct symbol *, struct objfile *));
>
>
next reply other threads:[~2000-03-22 13:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-01 0:00 glen mccready [this message]
2000-03-22 13:18 ` glen mccready
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200003222117.NAA04078@cygint.cygnus.com \
--to=gkm@cygnus.com \
--cc=gdb-patches@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox