lkml.org 
[lkml]   [2004]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [1/3] kgdb-lite for 2.6.3
    Hi!

    > Just some random comments after browsing the code.
    >
    > Sam
    >
    > > +
    > > +int kgdb_hexToLong(char **ptr, long *longValue);
    > A patch has been posted by Tom Rini to convert this to the
    > linux naming: kgdb_hex2long(...).

    Yep, and I did the patch originially ;-).

    > +static const char hexchars[] = "0123456789abcdef";
    > Grepping after 0123456789 in the src tree gives a lot of hits.
    > Maybe we should pull in some functionality from klibc, and place it in lib/
    > at some point in time.
    >
    > +
    > +static char remcomInBuffer[BUFMAX];
    > +static char remcomOutBuffer[BUFMAX];
    > This does not follow usual Linux naming convention.
    > Something like: remcom_in_buf, remcom_out_buf?

    Yes, and getpacket should also become get_packet...

    > > +static void getpacket(char *buffer)
    > > +{
    > > + unsigned char checksum;
    > > + unsigned char xmitcsum;
    > > + int i;
    > > + int count;
    > > + char ch;
    > > +
    > > + do {
    > > + /* wait around for the start character, ignore all other characters */
    > > + while ((ch = (kgdb_serial->read_char() & 0x7f)) != '$');
    >
    > Placing ';' on a seperate line would be good for the readability.

    > > +int kgdb_handle_exception(int exVector, int signo, int err_code,
    > > + struct pt_regs *linux_regs)
    > > +{
    > > + unsigned long length, addr;
    > > + char *ptr;
    > > + unsigned long flags;
    > > + unsigned long gdb_regs[NUMREGBYTES / sizeof (unsigned long)];
    > > + int i;
    > > + long threadid;
    > > + threadref thref;
    > > + struct task_struct *thread = NULL;
    > > + unsigned procid;
    > > + static char tmpstr[256];
    >
    > Too? large varriable on the stack.

    Whi one?

    tmpstr is static....
    Pavel
    --
    When do you have a heart between your knees?
    [Johanka's followup: and *two* hearts?]
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:01    [W:0.023 / U:3.976 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site