* [obv] Indent prototypes so they do not get into tags
@ 2011-07-13 15:58 Jan Kratochvil
2011-07-23 18:38 ` Mark Kettenis
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kratochvil @ 2011-07-13 15:58 UTC (permalink / raw)
To: gdb-patches
http://sourceware.org/ml/gdb-cvs/2011-07/msg00127.html
--- src/gdb/ChangeLog 2011/07/12 21:16:46 1.13185
+++ src/gdb/ChangeLog 2011/07/13 15:15:36 1.13186
@@ -1,3 +1,9 @@
+2011-07-13 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Code cleanup.
+ * dwarf2loc.c (dwarf_expr_frame_base_1, dwarf2_evaluate_loc_desc_full):
+ Indent prototypes so they do not get into tags.
+
2011-07-12 Jan Kratochvil <jan.kratochvil@redhat.com>
Code cleanup making also optimized out values lazy.
--- src/gdb/dwarf2loc.c 2011/07/12 21:16:47 1.120
+++ src/gdb/dwarf2loc.c 2011/07/13 15:15:42 1.121
@@ -44,15 +44,15 @@
extern int dwarf2_always_disassemble;
-static void
-dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc,
- const gdb_byte **start, size_t *length);
+static void dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc,
+ const gdb_byte **start, size_t *length);
-static struct value *
-dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
- const gdb_byte *data, unsigned short size,
- struct dwarf2_per_cu_data *per_cu,
- LONGEST byte_offset);
+static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
+ struct frame_info *frame,
+ const gdb_byte *data,
+ unsigned short size,
+ struct dwarf2_per_cu_data *per_cu,
+ LONGEST byte_offset);
/* A function for dealing with location lists. Given a
symbol baton (BATON) and a pc value (PC), find the appropriate
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [obv] Indent prototypes so they do not get into tags
2011-07-13 15:58 [obv] Indent prototypes so they do not get into tags Jan Kratochvil
@ 2011-07-23 18:38 ` Mark Kettenis
2011-07-23 18:43 ` Jan Kratochvil
0 siblings, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2011-07-23 18:38 UTC (permalink / raw)
To: jan.kratochvil; +Cc: gdb-patches
> Date: Wed, 13 Jul 2011 17:19:46 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> --- src/gdb/dwarf2loc.c 2011/07/12 21:16:47 1.120
> +++ src/gdb/dwarf2loc.c 2011/07/13 15:15:42 1.121
> @@ -44,15 +44,15 @@
>
> extern int dwarf2_always_disassemble;
>
> -static void
> -dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc,
> - const gdb_byte **start, size_t *length);
> +static void dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc,
> + const gdb_byte **start, size_t *length);
>
> -static struct value *
> -dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
> - const gdb_byte *data, unsigned short size,
> - struct dwarf2_per_cu_data *per_cu,
> - LONGEST byte_offset);
> +static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
> + struct frame_info *frame,
> + const gdb_byte *data,
> + unsigned short size,
> + struct dwarf2_per_cu_data *per_cu,
> + LONGEST byte_offset);
Bleah, that last one really becomes unreadable this way. Isn't there
a better way to this by bending the GNU coding style rules slightly in
a different way?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [obv] Indent prototypes so they do not get into tags
2011-07-23 18:38 ` Mark Kettenis
@ 2011-07-23 18:43 ` Jan Kratochvil
2011-07-24 20:26 ` Mark Kettenis
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kratochvil @ 2011-07-23 18:43 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
On Sat, 23 Jul 2011 19:14:11 +0200, Mark Kettenis wrote:
> > -static struct value *
> > -dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
> > - const gdb_byte *data, unsigned short size,
> > - struct dwarf2_per_cu_data *per_cu,
> > - LONGEST byte_offset);
> > +static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
> > + struct frame_info *frame,
> > + const gdb_byte *data,
> > + unsigned short size,
> > + struct dwarf2_per_cu_data *per_cu,
> > + LONGEST byte_offset);
>
> Bleah, that last one really becomes unreadable this way. Isn't there
> a better way to this by bending the GNU coding style rules slightly in
> a different way?
A agree it is ugly. GNU indent according to GCS (GNU Coding Standards):
static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
struct frame_info *frame,
const gdb_byte * data,
unsigned short size,
struct dwarf2_per_cu_data
*per_cu,
LONGEST byte_offset);
The other usual possibilitiesone can find in GDB sources are:
static struct value *
dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
const gdb_byte *data, unsigned short size,
struct dwarf2_per_cu_data *per_cu,
LONGEST byte_offset);
or:
static struct value *dwarf2_evaluate_loc_desc_full
(struct type *type, struct frame_info *frame, const gdb_byte *data,
unsigned short size, struct dwarf2_per_cu_data *per_cu, LONGEST byte_offset);
I really do not mind which one, as long as dwarf2_evaluate_loc_desc_full is not
in tags, none of the possibilities look as a clear win to me.
Thanks,
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [obv] Indent prototypes so they do not get into tags
2011-07-23 18:43 ` Jan Kratochvil
@ 2011-07-24 20:26 ` Mark Kettenis
0 siblings, 0 replies; 4+ messages in thread
From: Mark Kettenis @ 2011-07-24 20:26 UTC (permalink / raw)
To: jan.kratochvil; +Cc: gdb-patches
> Date: Sat, 23 Jul 2011 19:42:25 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> On Sat, 23 Jul 2011 19:14:11 +0200, Mark Kettenis wrote:
> > > -static struct value *
> > > -dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
> > > - const gdb_byte *data, unsigned short size,
> > > - struct dwarf2_per_cu_data *per_cu,
> > > - LONGEST byte_offset);
> > > +static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
> > > + struct frame_info *frame,
> > > + const gdb_byte *data,
> > > + unsigned short size,
> > > + struct dwarf2_per_cu_data *per_cu,
> > > + LONGEST byte_offset);
> >
> > Bleah, that last one really becomes unreadable this way. Isn't there
> > a better way to this by bending the GNU coding style rules slightly in
> > a different way?
>
> A agree it is ugly. GNU indent according to GCS (GNU Coding Standards):
>
> static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
> struct frame_info *frame,
> const gdb_byte * data,
> unsigned short size,
> struct dwarf2_per_cu_data
> *per_cu,
> LONGEST byte_offset);
>
> The other usual possibilitiesone can find in GDB sources are:
>
> static struct value *
> dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
> const gdb_byte *data, unsigned short size,
> struct dwarf2_per_cu_data *per_cu,
> LONGEST byte_offset);
I think this is by far the most readable one. I even think there was
some sort of consensus among GDB developers about using this style
some years ago.
> or:
> static struct value *dwarf2_evaluate_loc_desc_full
> (struct type *type, struct frame_info *frame, const gdb_byte *data,
> unsigned short size, struct dwarf2_per_cu_data *per_cu, LONGEST byte_offset);
>
> I really do not mind which one, as long as
> dwarf2_evaluate_loc_desc_full is not in tags, none of the
> possibilities look as a clear win to me.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-24 18:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13 15:58 [obv] Indent prototypes so they do not get into tags Jan Kratochvil
2011-07-23 18:38 ` Mark Kettenis
2011-07-23 18:43 ` Jan Kratochvil
2011-07-24 20:26 ` Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).