[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [feature request] Colouring matches in --result=grep outputs
From: |
Hideki IWAMOTO |
Subject: |
Re: [feature request] Colouring matches in --result=grep outputs |
Date: |
Fri, 21 Mar 2014 15:37:43 +0900 |
Hi. Yamaguchi san.
> Welcome to bug report.
When current CVS HEAD is used, execution of htags causes
segmentation fault in global.
My environment : Fedora Core 4 x86_64
Configure option: ./configure --prefix=$HOME/global --with-pread-pwrite
CFLAGS='-Wall -g -O2 -Wdeclaration-after-statement'
CPPFLAGS=-D_FORTIFY_SOURCE=2 --with-included-ltdl
------
$ htags -g --cvsweb=http://cvs.savannah.gnu.org/viewcvs/
--cvsweb-cvsroot=global --statistics
htags: terminated abnormally ''/home/iwamoto/global/bin/global' -xr
--result=ctags-xid --encode-path=" " --nofilter=path --nosource
--nofilter=sort ".*"' (errno = 0).
$ gdb -q global core.14473
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/home/iwamoto/global/bin/global -xr --result=ctags-xid
--encode-path= --nofil'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
#0 0x00000035eb072770 in strlen () from /lib64/libc.so.6
(gdb) bt
#0 0x00000035eb072770 in strlen () from /lib64/libc.so.6
#1 0x00000035eb05cb2e in fputs () from /lib64/libc.so.6
#2 0x0000000000407e89 in convert_put_using (cv=0x59b880, tag=0x5ab510
"AFTER_HEADER", path=0x5a2ac0 "./htags/src2html.c",
lineno=727, rest=0x0, fid=0x59d9f8 "234") at convert.c:545
#3 0x0000000000406860 in output_with_formatting (cv=0x59b880, gtp=0x5a7b00,
flags=13) at output.c:184
#4 0x00000000004043e2 in search (pattern=0x7fffffedc9c7 ".*", root=Variable
"root" is not available.
) at global.c:1679
#5 0x00000000004044a5 in tagsearch (pattern=0x7fffffedc9c7 ".*", cwd=0x578e60
"/home/iwamoto/public_html/global-cvs",
root=0x57ae60 "/home/iwamoto/public_html/global-cvs", dbpath=0x57be60
"/home/iwamoto/public_html/global-cvs", db=2)
at global.c:1720
#6 0x00000000004058fd in main (argc=Variable "argc" is not available.
) at global.c:903
------
On Fri, 21 Mar 2014 11:21:12 +0900
Shigio YAMAGUCHI <address@hidden> wrote:
> Hi all,
> I have committed a piece of code which realizes the coloring function.
> Please try the following command line:
>
> $ global --color=always -x main
>
> It supports the followings:
> o --color option which similar to grep(1)
> o GREP_COLOR environment variable
>
> The --color option is effective to the following commands:
> <default command>
> -f command
> -g command
> -I command
> -P command
>
> These are not supported this time:
> o -C, --colour option
> o GREP_COLORS environment variable
>
> The followings are considered to be another matters.
> o Options like -E(--extended-regexp), -N(--project), -m(--match-case)
> o GLOBAL_OPTIONS (GTAGS_OPTIONS, HTAGS_OPTIONS)
> They need to be discussed, respectively. I will write RFCs
> for them.
>
> I myself wrote the code. In fact, I couldn't make full use of Jason's
> code by my procedural defect (I apologized to him). However, his code
> was a big help, and showed the way to which I should go. I believe that
> I have realized a thing which is almost the same function as his patch.
> Thank you Jason!
>
> Welcome to bug report.
>
> --
> Shigio YAMAGUCHI <address@hidden>
> PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3