Hello Sandeep Kumar,
thanks for the patch.

2012/7/4 Sandeep Ruhil <[email protected]>:
> Thanks Vojteck,
>    i have solved the problem by splitting symtab.h, as per your suggestion.
> I am attaching a full patch for this ticket, it is over revision no.
> 1534. Please
> review it and let me know if there is any space for improvement :)
Definitely the symbol names completion works and it is a joy to use
the call* commands now.

However, I have a few comments and also several ideas for even better
tab completion.

First of all, your patch does not compile for 64bit architectures due
to printf-related warning. Please, do use %zu when printing size_t
type (as this is quite common error, I created a special wiki page for
it [1]).

Next, if you look at the final patch, there are two pretty long blocks
of virtually the same code. It is the part that deals with printing
the --more-- prompt and reading user input. I decided to move them
into a separate function.

And it would be very nice to have this completion context specific
depending on the command. E.g. for test it would display existing
tests, for ipc list of existing tasks etc. But this is just an idea.

Because the patch (except for the problem with 64bits which is easy to
fix) looks okay to me, I already applied it to the mainline (rev
1539). Thanks once more.

Regards,
- Vojta

[1] http://trac.helenos.org/wiki/Printf

>
>
> On Fri, Jun 29, 2012 at 12:38 PM, Vojtech Horky <[email protected]> 
> wrote:
>>
>> Hello Sandeep Kumar,
>> sorry for replying so late. I hope you are still with us :-).
>>
>> 2012/6/10 Sandeep Ruhil <[email protected]>:
>> > Hey,
>> >
>> > I am encountering a small problem in working on second point of this 
>> > ticket.
>> >
>> > I need an object of indev_t inside the function symtab_compl of file
>> > kernel/generic/src/debug/symtab.c but when i include the header file
>> > <console/chardev.h> (containing the definition of indev_t) in the file
>> > kernel/generic/include/symtab.h (containing the prototype of symtab_compl
>> > function), i get the following compilation error :
>> >
>> > In file included from generic/include/console/chardev.h:40:0,
>> >          from generic/include/symtab.h:39,
>> >          from generic/include/debug.h:39,
>> >          from generic/include/synch/spinlock.h:42,
>> >          from generic/include/proc/scheduler.h:38,
>> >          from arch/ia32/src/proc/scheduler.c:35:
>> > generic/include/synch/waitq.h:56:2: error: expected 
>> > specifier-qualifier-list
>> > before 'IRQ_SPINLOCK_DECLARE'
>> >
>> > When i inspected the reason, it turned out that :
>> >     spinlock.h includes debug.h
>> >     debug.h includes symtab.h
>> >     symtab.h includes chardev.h (my include)
>> >     chardev.h includes waitq.h
>> >     waitq.h uses IRQ_SPINLOCK_DECLARE, which is declared in spinlock.h but
>> > spinlock.h is not fully included as the compiler is following an inclusion
>> > of spinlock.h file and hence compiler cannot find the definition of
>> > IRQ_SPINLOCK_DECLARE macro.
>> >
>> > What can i do to resolve this error?
>> I would go for splitting the symtab.h into two files. Keep the lookup
>> functionality in one and move printing functions (symtab_print_search
>> and symtab_compl) to another one.
>>
>> This would not break any files except those under console/*.c so it
>> shall be pretty painless. The only problem is that these functions
>> require the symtab_search_one() function that is private (i.e. static)
>> to symtab.c. But I think that it is okay to make this function public
>> and move it to symtab.h.
>>
>> Hope this helps.
>>
>> Regards,
>> - Vojta
>>
>>
>> >
>> >
>> > --
>> > Regards,
>> > Sandeep Kumar
>> >
>> >
>> > _______________________________________________
>> > HelenOS-devel mailing list
>> > [email protected]
>> > http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
>> >
>>
>> _______________________________________________
>> HelenOS-devel mailing list
>> [email protected]
>> http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
>
>
>
>
> --
> Regards,
> Sandeep Kumar
>
> _______________________________________________
> HelenOS-devel mailing list
> [email protected]
> http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
>

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to