This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Implement -break-commands


Tom> There's some other little style nits in the patch -- over-bracing
Tom> in the second patch, mostly.

Volodya> Is that something you want fixed? I do prefer bracing
Volodya> everything, since that is safer in the long run.

Yes, please fix this.  AFAIK this is the documented style.

Volodya> +void
Volodya> +breakpoint_set_commands (struct breakpoint *b, struct command_line *commands)

Tom> Needs a header comment.

Volodya> Do we have a policy if function should be documented in header,
Volodya> or implementation? It seems many existing files have comments
Volodya> on implementation.

It is hard to say whether we arrived at a policy the last time we had
this discussion.  These things rarely seem to converge, they just wander
off into the weeds.

I usually follow the prevailing style of the module I am modifying.
That is always a safe thing to do.

Tom> I think this would be cleaner if read_command_lines_1 took a "user_data"
Tom> argument and then there were no new globals.

Volodya> It would be clearer, though I decided not to do that because
Volodya> it's not likely we'll need another such function, and the use
Volodya> of globals in this context is ugly, but safe. Shall I refactor?

This one is up to you :-)

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]