* [RFC] Better apropos patch
@ 2000-03-22 12:58 Daniel Berlin
2000-03-22 13:07 ` Fernando Nasser
2000-04-01 0:00 ` Daniel Berlin
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Berlin @ 2000-03-22 12:58 UTC (permalink / raw)
To: gdb-patches
Won't double print, works *much* faster, properly displays prefixes.
Let me know what you guys think.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] Better apropos patch
2000-03-22 12:58 [RFC] Better apropos patch Daniel Berlin
@ 2000-03-22 13:07 ` Fernando Nasser
2000-04-01 0:00 ` Daniel Berlin
1 sibling, 0 replies; 4+ messages in thread
From: Fernando Nasser @ 2000-03-22 13:07 UTC (permalink / raw)
To: Daniel Berlin; +Cc: gdb-patches
Daniel Berlin wrote:
>
> Won't double print, works *much* faster, properly displays prefixes.
>
> Let me know what you guys think.
>
Thanks for doing this Daniel. I am eager to incorporate it.
It seems that your patch is not in GNU style though
(unless the diff "> " are distorting it).
Can you double check it?
--
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 dan@cgsoftware.com Wed Mar 22 13:09:00 2000
From: Daniel Berlin <dan@cgsoftware.com>
To: Fernando Nasser <fnasser@redhat.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [RFC] Better apropos patch
Date: Wed, 22 Mar 2000 13:09:00 -0000
Message-id: <Pine.LNX.4.10.10003221307320.20082-100000@propylaea.anduin.com>
References: <38D935D1.7AF0B073@redhat.com>
X-SW-Source: 2000-03/msg00478.html
Content-length: 923
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.
--Dan
On Wed, 22 Mar 2000, Fernando Nasser wrote:
> Daniel Berlin wrote:
> >
> > Won't double print, works *much* faster, properly displays prefixes.
> >
> > Let me know what you guys think.
> >
>
> Thanks for doing this Daniel. I am eager to incorporate it.
>
> It seems that your patch is not in GNU style though
> (unless the diff "> " are distorting it).
>
> Can you double check it?
>
>
> --
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [RFC] Better apropos patch
2000-03-22 12:58 [RFC] Better apropos patch Daniel Berlin
2000-03-22 13:07 ` Fernando Nasser
@ 2000-04-01 0:00 ` Daniel Berlin
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Berlin @ 2000-04-01 0:00 UTC (permalink / raw)
To: gdb-patches
Won't double print, works *much* faster, properly displays prefixes.
Let me know what you guys think.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] Better apropos patch
[not found] ` <38D9429B.798F82E2@redhat.com>
@ 2000-03-22 14:43 ` Daniel Berlin+list.gdb-patches
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Berlin+list.gdb-patches @ 2000-03-22 14:43 UTC (permalink / raw)
To: gdb-patches
Fernando Nasser <fnasser@redhat.com> writes:
> Daniel Berlin wrote:
> > 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.
Okeydokey
>
> 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'll go finish commenting it, reformat it, add a changelog entry, and
add a texinfo entry in a few minutes.
>
> This is way cool. I am looking forward to the final patch.
It'll be about 20 minutes.
>
> P.S.: Are you going to send a gdb.texinfo entry as well?
Yup, i'd be happy to.
>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).
From msnyder@cygnus.com Wed Mar 22 14:47:00 2000
From: Michael Snyder <msnyder@cygnus.com>
To: Toshiyasu Morita <tm@netcom.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH]: Allow struct compare in expressions.
Date: Wed, 22 Mar 2000 14:47:00 -0000
Message-id: <38D94D62.6951@cygnus.com>
References: <200003222218.OAA02705@netcom.com>
X-SW-Source: 2000-03/msg00484.html
Content-length: 5378
Toshiyasu Morita wrote:
>
> Does this compare ignore the padding in the struct?
Nope. It's a binary compare, like memcmp.
> >
> >
> > 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 *));
> >
> >
From shebs@apple.com Wed Mar 22 14:57:00 2000
From: Stan Shebs <shebs@apple.com>
To: dan@cgsoftware.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [RFC] Better apropos patch
Date: Wed, 22 Mar 2000 14:57:00 -0000
Message-id: <38D94FF8.2932EF67@apple.com>
References: <Pine.LNX.4.10.10003221307320.20082-100000@propylaea.anduin.com> <38D9429B.798F82E2@redhat.com> <wvmufwx9.fsf@dan.resnet.rochester.edu>
X-SW-Source: 2000-03/msg00485.html
Content-length: 451
"Daniel Berlin+list.gdb-patches" wrote:
> I'll go finish commenting it, reformat it, add a changelog entry, and
> add a texinfo entry in a few minutes.
Please please please add a testcase or two also. I suggest at the
end of gdb.base/help.exp, and lots of wildcarding in the match; but
you can count on basic commands like "break" and "print" always
being in GDB...
This apropos command *will* be really nice to have! Thanks for adding it!
Stan
From jtc@redback.com Wed Mar 22 16:07:00 2000
From: jtc@redback.com (J.T. Conklin)
To: gdb-patches@sourceware.cygnus.com
Subject: RFA: USE_STRUCT_CONVENTION for NetBSD/i386
Date: Wed, 22 Mar 2000 16:07:00 -0000
Message-id: <5msnxieegg.fsf@jtc.redbacknetworks.com>
X-SW-Source: 2000-03/msg00486.html
Content-length: 2096
I submit the enclosed patch for approval. This change allows GDB to
extract the return value for most functions returning structs on
NetBSD/i386 systems.
Problems remain with functions returning structs of these two forms:
struct one_float_t {
float x;
};
struct one_double_t {
double x;
};
But all others work.
--jtc
2000-03-22 J.T. Conklin <jtc@redback.com>
* i386/tm-nbsd.h (USE_STRUCT_CONVENTION): Define.
* i386nbsd-nat.c (i386nbsd_use_struct_convention): New function.
Index: i386nbsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386nbsd-nat.c,v
retrieving revision 1.1
diff -c -r1.1 i386nbsd-nat.c
*** i386nbsd-nat.c 2000/03/22 01:36:31 1.1
--- i386nbsd-nat.c 2000/03/22 22:59:30
***************
*** 148,154 ****
ptrace (PT_SETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fpregisters, 0);
}
!
struct md_core
{
struct reg intreg;
--- 148,163 ----
ptrace (PT_SETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fpregisters, 0);
}
! \f
! int
! i386nbsd_use_struct_convention (int gcc_p, struct type *type)
! {
! return !(TYPE_LENGTH (type) == 1
! || TYPE_LENGTH (type) == 2
! || TYPE_LENGTH (type) == 4
! || TYPE_LENGTH (type) == 8);
! }
! \f
struct md_core
{
struct reg intreg;
Index: config/i386/tm-nbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-nbsd.h,v
retrieving revision 1.2
diff -c -r1.2 tm-nbsd.h
*** tm-nbsd.h 2000/03/22 01:36:31 1.2
--- tm-nbsd.h 2000/03/22 22:59:30
***************
*** 26,31 ****
--- 26,36 ----
#include "i386/tm-i386bsd.h"
#include "tm-nbsd.h"
+ extern use_struct_convention_fn i386nbsd_use_struct_convention;
+ #define USE_STRUCT_CONVENTION(gcc_p, type) \
+ i386nbsd_use_struct_convention(gcc_p, type)
+
+
#define JB_ELEMENT_SIZE sizeof(int) /* jmp_buf[_JBLEN] is array of ints */
#define JB_PC 0 /* Setjmp()'s return PC saved here */
--
J.T. Conklin
RedBack Networks
From kettenis@wins.uva.nl Wed Mar 22 16:33:00 2000
From: Mark Kettenis <kettenis@wins.uva.nl>
To: jtc@redback.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: RFA: USE_STRUCT_CONVENTION for NetBSD/i386
Date: Wed, 22 Mar 2000 16:33:00 -0000
Message-id: <200003230032.e2N0WuD00374@delius.kettenis.local>
References: <5msnxieegg.fsf@jtc.redbacknetworks.com>
X-SW-Source: 2000-03/msg00487.html
Content-length: 371
From: jtc@redback.com (J.T. Conklin)
Date: 22 Mar 2000 16:07:43 -0800
Problems remain with functions returning structs of these two forms:
struct one_float_t {
float x;
};
struct one_double_t {
double x;
};
Could you elaborate on that? What is the convention used by NetBSD
for returning those structs and why does GDB fail?
Mark
From dan@cgsoftware.com Wed Mar 22 16:39:00 2000
From: dan@cgsoftware.com (Daniel Berlin+list.gdb-patches)
To: gdb-patches@sourceware.cygnus.com
Subject: Re: [RFC] Better apropos patch
Date: Wed, 22 Mar 2000 16:39:00 -0000
Message-id: <7leutt8u.fsf@dan.resnet.rochester.edu>
References: <Pine.LNX.4.10.10003221307320.20082-100000@propylaea.anduin.com> <38D9429B.798F82E2@redhat.com> <wvmufwx9.fsf@dan.resnet.rochester.edu> <38D94FF8.2932EF67@apple.com>
X-SW-Source: 2000-03/msg00488.html
Content-length: 554
Stan Shebs <shebs@apple.com> writes:
Done, on all accounts, about to post.
> "Daniel Berlin+list.gdb-patches" wrote:
>
> > I'll go finish commenting it, reformat it, add a changelog entry, and
> > add a texinfo entry in a few minutes.
>
> Please please please add a testcase or two also. I suggest at the
> end of gdb.base/help.exp, and lots of wildcarding in the match; but
> you can count on basic commands like "break" and "print" always
> being in GDB...
>
> This apropos command *will* be really nice to have! Thanks for adding it!
>
> Stan
From dan@cgsoftware.com Wed Mar 22 16:46:00 2000
From: dan@cgsoftware.com (Daniel Berlin+list.gdb-patches)
To: gdb-patches@sourceware.cygnus.com
Cc: Fernando Nasser <fnasser@cygnus.com>, Stan Shebs <shebs@apple.com>
Subject: [RFA]: Apropos patch
Date: Wed, 22 Mar 2000 16:46:00 -0000
Message-id: <1z52tswd.fsf@dan.resnet.rochester.edu>
X-SW-Source: 2000-03/msg00489.html
Content-length: 296
It includes documentation, a test case (which uses a slightly weird
regexp so it only finds one thing, and we make sure it only found one
thing), and all the apropriate changelog entries.
Let me know if i can check it in, i believe it needs approval from
Stan Shebs, and Fernando Nasser.
--Dan
From jtc@redback.com Wed Mar 22 17:03:00 2000
From: jtc@redback.com (J.T. Conklin)
To: Mark Kettenis <kettenis@wins.uva.nl>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: RFA: USE_STRUCT_CONVENTION for NetBSD/i386
Date: Wed, 22 Mar 2000 17:03:00 -0000
Message-id: <5mitye7b2s.fsf@jtc.redbacknetworks.com>
References: <5msnxieegg.fsf@jtc.redbacknetworks.com> <200003230032.e2N0WuD00374@delius.kettenis.local>
X-SW-Source: 2000-03/msg00490.html
Content-length: 687
>>>>> "Mark" == Mark Kettenis <kettenis@wins.uva.nl> writes:
Mark> Problems remain with functions returning structs of these two forms:
Mark>
Mark> struct one_float_t {
Mark> float x;
Mark> };
Mark>
Mark> struct one_double_t {
Mark> double x;
Mark> };
Mark>
Mark> Could you elaborate on that? What is the convention used by NetBSD
Mark> for returning those structs and why does GDB fail?
Gcc, at least gcc-2.95.2, returns the above structs in floating point
registers instead of integer registers.
I don't think NetBSD's gcc config does anything special except for
setting DEFAULT_PPC_STRUCT_RETURN to 0.
--jtc
--
J.T. Conklin
RedBack Networks
From ezannoni@cygnus.com Wed Mar 22 17:06:00 2000
From: Elena Zannoni <ezannoni@cygnus.com>
To: "Philippe De Muyter" <phdm@macqel.be>
Cc: ac131313@cygnus.com (Andrew Cagney), ezannoni@cygnus.com, gdb-patches@sourceware.cygnus.com
Subject: Re: HAVE_POLL is not enough - RFA
Date: Wed, 22 Mar 2000 17:06:00 -0000
Message-id: <14553.28151.426657.410579@kwikemart.cygnus.com>
References: <38D5BE1D.7BB02C99@cygnus.com> <200003211559.QAA16996@mail.macqel.be>
X-SW-Source: 2000-03/msg00491.html
Content-length: 986
Philippe De Muyter writes:
> Andrew Cagney wrote :
> > if (use_poll)
> > {
> > #if HAVE_POLL
> > ...
> > #else
> > internal_error (...);
> > #endif
> > }
> > else
> > {
> > }
> I have done that. OK to commit ?
>
The patch would be OK, except that there is a problem on platforms that
don't have poll() at all, like cygwin.
In those cases HAVE_POLL is undefined, not defined as 0. This is what
the AC_CHECK_FUNCS does, I don't know if there is a way to specify to
autoconf that we would like to have HAVE_POLL == 0 in case the check
fails.
Instead of these 2 lines:
> +/* Do we use poll or select ? */
> +static unsigned char use_poll = HAVE_POLL;
We should use:
#ifdef HAVE_POLL
#define USE_POLL 1
#else
#define USE_POLL 0
#endif /* HAVE_POLL */
/* Do we use poll or select ? */
static unsigned char use_poll = USE_POLL;
I am testing with this modification at the moment, on cygwin. I will also
give a spin to target async.
Elena
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-04-01 0:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-22 12:58 [RFC] Better apropos patch Daniel Berlin
2000-03-22 13:07 ` Fernando Nasser
2000-04-01 0:00 ` Daniel Berlin
[not found] <Pine.LNX.4.10.10003221307320.20082-100000@propylaea.anduin.com>
[not found] ` <38D9429B.798F82E2@redhat.com>
2000-03-22 14:43 ` Daniel Berlin+list.gdb-patches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox