This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] | |
Attached is the patch that cleans up dbgcnt following Ian's review. Bootstrapped on x86-64. The doc changes has been manually inspected.
On 05 Jun 2007 21:29:24 -0700, Ian Lance Taylor <iant@google.com> wrote: ...
In dbgcnt.c:
+ while (comma) + { + colon = strchr (comma + 1, ':'); + if (colon == NULL || !(colon[1] >= '0' && colon[1] <= '9')) + return; + dbg_cnt_set_limit_by_name (comma + 1, colon - (comma + 1), atoi (colon + 1)); + comma = strchr (colon + 1, ','); + }
It seems like if you make a mistake writing the parameter you will get no warning. I think that is a bad idea, even for debugging code. There should be a warning for invalid option syntax or for a nonexistent parameter.
In dbgcnt.def:
+ By default, all limits are UINT_MAX. + Since debug count is unsigned int, <= UINT_MAX returns true always. + i.e. dbg_cnt() returns true always regardless of the counter value + (although it still counts the event). + Use -fdbg-cnt=counter1:N,counter2:M,... + which sets the limit for counter1 to N, and the limit for counter2 to M, etc. + e.g. setting a limit to zero will make dbg_cnt () return false *always*.
This needs to be documented in doc/invoke.texi. It's probably not necessary to document each of the support debugging names.
-- #pragma ident "Seongbae Park, compiler, http://seongbae.blogspot.com"
Attachment:
df-dbg-cnt-cleanup.diff
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |