우선 meld 는 다음과 같이 설치한다.

sudo python setup.py install

그러면 대부분 다음과 같은 에러를 만난다.

meld : unable to execute 'intltool-update'

 

이를 해결하기 위해선 다음과 같이 실행한다.

sudo apt-get install intltool itstool

그리고 다시 sudo python setup.py install 하면 된다.

리눅스를 쓰면서 항상 소위 빡치는게, 뭔가 설치 할 때 dependency에 대한 체크와 처리 방법이 부족하다.  dependency이름도 스스로 알아야 설치를 하던 말던 한다.

그냥 설치할 때 자동으로 설치하면 안될려나? 그런게 synaptic 같은 거겠지?

'리눅스 > 스크립트/유틸' 카테고리의 다른 글

cscope manpage  (0) 2014.09.07
cscope + quickfix  (0) 2014.08.29
samba log 관리  (0) 2014.08.28
iso-8859-1 포맷 파일에 들어간 한글이 깨져나올때  (0) 2014.08.12
현재 설정된 java 위치 알아내기  (0) 2014.07.14
Posted by code cat
리눅스2014. 11. 12. 08:49

출처:http://www.linux-m68k.org/faq/glibcinfo.html

What's the difference between glibc and libc6?

libc is the C library; basically, it contains all of the system functions that most (if not all) programs need to run on Linux. It's similar to a combination of dos.library and exec.library on Amigas, but it also contains a lot of things that are in the C runtime library (like, for example, ixemul.library or the .lib files included with SAS/C and other compilers for AmigaOS).

libc6 and glibc are the same version of libc; officially, it's version 2 of the GNU C Library (but it's the sixth major version of the Linux C library). You can read more about glibc at the GNU C Library pages.

The major versions of libc for Linux/m68k are:

  • libc4: Version 4 of the C library is based on the a.out binary format; it was the first version to support dynamic linking (shared libraries). However, a.out dynamic linking had a lot of problems (for example, you had to build the library twice, so you could add a jump table to the library on the second pass, and the library was non-relocatable, so every library had to be allocated a block of space to load into), so it was abandoned (at least on m68k; Intel users may still need it for some esoteric applications). You should not be using libc4 for anything any more. If you do use it, we will hunt you down and execute you as an example to others. (Not really, but you get the point...)

  • libc5: Version 5 of the C library was a fairly big improvement over version 4. However, it still had some problems (adding new functions or changing structure sizes introduced subtle bugs) so it is no longer being actively developed. It was the first version of the Linux C Library based on ELF, a different file format that made programs loadable in more flexible ways (it uses hunks, similar to the AmigaOS executable file format). libc5 is officially deprecated on m68k; use libc6 for new compilations.

  • libc6: Version 6 of the Linux C Library is version 2 of the GNU C Library; the confusion is because Linux has had multiple C library versions. This is the newest technology available, and includes features (like "weak symbols") that theoretically allow new functions and modified structures in the library without breaking existing code that uses version 6, and avoid kernel version dependency problems. You should be coding and compiling all code against this version. 


Posted by code cat
리눅스2014. 9. 29. 09:12

소스 코드 라인이 몇줄이나 되는지 알아보고 싶을때가 있다.

다음은 c파일이나 header파일의 소스 코드 라인 수를 세는 방법이다.

find . -name '*.[ch]' | xargs wc -l


'리눅스' 카테고리의 다른 글

libc6?  (0) 2014.11.12
[GIT] 자신이 따온 clone 주소 알아보기  (0) 2014.09.23
upstart 설치하기  (0) 2014.09.15
.pam_environment  (0) 2014.09.04
[wireshark] there are no interfaces on which a capture can be done  (0) 2014.09.02
Posted by code cat
리눅스2014. 9. 23. 22:53

가끔 다시 clone을 해야 할 때가 있을 것이다.  그때되면 "어라 어디서 가져왔지???" 하지 말고 다음과 같이 하여 간단히 주소를 알아내자.


git remote show origin


그럼 url에 자신의 아이디 등과 주소가 보이는데, 이를 이용해서 다시 clone하면 된다.

'리눅스' 카테고리의 다른 글

libc6?  (0) 2014.11.12
소스코드 라인 수 세는 방법  (0) 2014.09.29
upstart 설치하기  (0) 2014.09.15
.pam_environment  (0) 2014.09.04
[wireshark] there are no interfaces on which a capture can be done  (0) 2014.09.02
Posted by code cat
리눅스/커널2014. 9. 19. 09:02

Kernel Debugging Tricks

Debugging the kernel is not necessarily rocket science; in fact it can be achieved using very simple and straight forward techniques and some time, patience and perseverance. This page describes some tricks and techniques to help debug the kernel.

printk is your friend

The simplest, and probably most effective way to debug the kernel is via printk(). This enables one to print messages to the console, and it very similar to printf(). Note that printk() can slow down the execution of code which can alter the way code runs, for example, changing the way race conditions occur.

CHANGING THE RING BUFFER SIZE

The internal kernel console message buffer can sometimes be too small to capture all of the printk messages, especially when debug code generates a lot of printk messages. If the buffer fills up, it wraps around and one can lose valueable debug messages.

To increase the internal buffer, use the kernel boot parameter:

log_buf_len=N

where N is the size of the buffer in bytes, and must be a power of 2.

CHANGING DEBUG LEVELS

One can specify the type of printk() log level by pre-pending the 1st printk() argument with one of the following:

KERN_EMERG    /* system is unusable                   */
KERN_ALERT    /* action must be taken immediately     */
KERN_CRIT     /* critical conditions                  */
KERN_ERR      /* error conditions                     */
KERN_WARNING  /* warning conditions                   */
KERN_NOTICE   /* normal but significant condition     */
KERN_INFO     /* informational                        */
KERN_DEBUG    /* debug-level messages                 */

e.g. printk(KERN_DEBUG "example debug message\n");

If one does not specify the log level then the default log level of KERN_WARNING is used. For example, enable all levels of console message:

echo 7 > /proc/sys/kernel/printk

To view console messages at boot, remove the quite and splash boot parameters from the kernel boot line in grub. This will disable the usplash splash screen and re-enable console messages.

Serial Console

Serial console enables one to dump out console messages over a serial cable. Most modern PCs do not have legacy serial ports, so instead, one can use a USB serial dongle instead. A "null serial cable" or "universal file transfer cable" is needed to connect the target computer with the host. Most commonly this will be a DB9 female to DB9 female null serial cable. In addition, one needs to enable USB serial support as a kernel build configuration:

CONFIG_USB_SERIAL_CONSOLE=y
CONFIG_USB_SERIAL=y

and enable the appropriate driver, e.g.:

CONFIG_USB_SERIAL_PL2303=y

and boot this kernel with

console=tty console=ttyUSB0,9600n8

one may need to adjust the baud rate appropriately.

Note: Generally, there is NO hardware or software flow control on serial console drivers, which means one may get dropped characters when running very high speed tty baud rates, such as 115200 baud.

Console Messages

Kernel Oops messages general contain a fair amount of information, ranging from register and process state dump and a stack dump too. Unfortunately the stack dump can be more than 25 lines and can scroll off the top of the 25 line Virtual Console. Hence to capture more of a Oops, try the following:

chvt 1
setfont /usr/share/consolefonts/Uni1-VGA8.psf.gz

Of course, one may still have a stack dump that scrolls the top of the Oops message off the console, so one trick is to rebuild the kernel with the stack dump removed, just to capture the initial Oops information. To do this, modify dump_stack in arch/x86/kernel/dumpstack_*.c and comment out the call to show_trace()

Slowing down kernel messages on boot

One may find a machine hangs during the kernel boot process and one would like to be able to see all the kernel messages but unfortunately they scroll off the console too quickly. One can slow down kernel console messages at boot time using by building the kernel with the following option enabled:

CONFIG_BOOT_PRINTK_DELAY=y

And boot the machine with the following kernel boot parameter:

boot_delay=N

where N = msecs delay between each console message.

Kernel panic during suspend

Debugging suspend/resume issues can be difficult if the kernel panics during suspend, especially late in the suspend because console messages are disabled. One can stop console messages from being suspended by using the kernel parameter no_console_suspend:

no_console_suspend=1

This will force the console not to suspend. Boot with this option, chvt 1 (to console #1), and suspend using pm-suspend

Serial Console in VirtualBox

In some debug scenerios it can be helpful to debug the kernel running inside a virtual machine. This is useful for some classes of non-hardware specific bugs, for example generic kernel core problems or debugging file system drivers.

One can capture Linux console messages running inside VirtualBox by setting it the VirtualBox serial log to /tmp/vbox and running a serial tty communications program such as minicom, and configure it to communicate with a named pipe tty called unix#/tmp/vbox

Boot with virtualised kernel boot line:

console=tty console=ttyS0,9600 

and minicom will capture the console messages

Network Console

One can route console messages over a network using netconsole. Note that it's not useful for capturing kernel panics as kernel halts before the messages can be transmitted over the network. However it can be useful to monitor systems without the need of message serial console cabling.

see Documentation/networking/netconsole.txt

netconsole=[src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr]

        where
             src-port      source for UDP packets (defaults to 6665)
             src-ip        source IP to use (interface address)
             dev           network interface (eth0)
             tgt-port      port for logging agent (6666)
             tgt-ip        IP address for logging agent
             tgt-macaddr   ethernet MAC address for logging agent (broadcast)

Examples:

linux netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc

The remote host can run either 'netcat -u -l -p <port>' or syslogd.

gdb on vmlinux

One can disassemble a built kernel using gdb on the vmlinux image. This is useful when one gets a kernel Oops message and a stack dump - one can then disassemble the object code and see where the Oops is occuring. For example:

gdb  debian/build/build-generic/vmlinux
(gdb) disassemble printk
Dump of assembler code for function printk:
0xffffffff8023dce0 <printk+0>:  sub    $0xd8,%rsp
0xffffffff8023dce7 <printk+7>:  lea    0xe0(%rsp),%rax
0xffffffff8023dcef <printk+15>: mov    %rsi,0x28(%rsp)
0xffffffff8023dcf4 <printk+20>: mov    %rsp,%rsi
0xffffffff8023dcf7 <printk+23>: mov    %rdx,0x30(%rsp)
0xffffffff8023dcfc <printk+28>: mov    %rcx,0x38(%rsp)
0xffffffff8023dd01 <printk+33>: mov    %rax,0x8(%rsp)
0xffffffff8023dd06 <printk+38>: lea    0x20(%rsp),%rax
0xffffffff8023dd0b <printk+43>: mov    %r8,0x40(%rsp)
0xffffffff8023dd10 <printk+48>: mov    %r9,0x48(%rsp)
0xffffffff8023dd15 <printk+53>: movl   $0x8,(%rsp)
0xffffffff8023dd1c <printk+60>: movl   $0x30,0x4(%rsp)
0xffffffff8023dd24 <printk+68>: mov    %rax,0x10(%rsp)
0xffffffff8023dd29 <printk+73>: callq  0xffffffff8023d980 <vprintk>
0xffffffff8023dd2e <printk+78>: add    $0xd8,%rsp
0xffffffff8023dd35 <printk+85>: retq   
End of assembler dump.

Objdump

If one has the built object code at hand, one can disassemble the object using objdump as follows:

objdump -SdCg debian/build/build-generic/fs/dcache.o

Using GDB to find the location where your kernel panicked or oopsed.

A quick and easy way to find the line of code where your kernel panicked or oopsed is to use GDB list command. You can do this as follows.

Lets assume your panic/oops message says something like:

[  174.507084] Stack:
[  174.507163]  ce0bd8ac 00000008 00000000 ce4a7e90 c039ce30 ce0bd8ac c0718b04 c07185a0
[  174.507380]  ce4a7ea0 c0398f22 ce0bd8ac c0718b04 ce4a7eb0 c037deee ce0bd8e0 ce0bd8ac
[  174.507597]  ce4a7ec0 c037dfe0 c07185a0 ce0bd8ac ce4a7ed4 c037d353 ce0bd8ac ce0bd8ac
[  174.507888] Call Trace:
[  174.508125]  [<c039ce30>] ? sd_remove+0x20/0x70
[  174.508235]  [<c0398f22>] ? scsi_bus_remove+0x32/0x40
[  174.508326]  [<c037deee>] ? __device_release_driver+0x3e/0x70
[  174.508421]  [<c037dfe0>] ? device_release_driver+0x20/0x40
[  174.508514]  [<c037d353>] ? bus_remove_device+0x73/0x90
[  174.508606]  [<c037bccf>] ? device_del+0xef/0x150
[  174.508693]  [<c0399207>] ? __scsi_remove_device+0x47/0x80
[  174.508786]  [<c0399262>] ? scsi_remove_device+0x22/0x40
[  174.508877]  [<c0399324>] ? __scsi_remove_target+0x94/0xd0
[  174.508969]  [<c03993c0>] ? __remove_child+0x0/0x20
[  174.509060]  [<c03993d7>] ? __remove_child+0x17/0x20
[  174.509148]  [<c037b868>] ? device_for_each_child+0x38/0x60
[  174.509241]  [<c039938f>] ? scsi_remove_target+0x2f/0x60
[  174.509393]  [<d0c38907>] ? __iscsi_unbind_session+0x77/0xa0 [scsi_transport_iscsi]
[  174.509699]  [<c015272e>] ? run_workqueue+0x6e/0x140
[  174.509801]  [<d0c38890>] ? __iscsi_unbind_session+0x0/0xa0 [scsi_transport_iscsi]
[  174.509977]  [<c0152888>] ? worker_thread+0x88/0xe0
[  174.510047]  [<c01566a0>] ? autoremove_wake_function+0x0/0x40

Lets say you want to know what line of code represents sd_remove+0x20/0x70. cd to the ubuntu debian/build/build-generic directory in your kernel tree and run gdb on the ".o" file which has the function sd_remove() in this case in sd.o, and use the gdb "list" command, (gdb) list *(function+0xoffset), in this case function is sd_remove() and offset is 0x20, and gdb should tell you the line number where you hit the panic or oops. This has worked for me very reliably for most cases.

manjo@hungry:~/devel/ubuntu/kernel/ubuntu-karmic-397906/debian/build/build-generic/drivers/scsi$ gdb sd.o
GNU gdb (GDB) 6.8.50.20090628-cvs-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) list *(sd_remove+0x20)
0x1650 is in sd_remove (/home/manjo/devel/ubuntu/kernel/ubuntu-karmic-397906/drivers/scsi/sd.c:2125).
2120    static int sd_remove(struct device *dev)
2121    {
2122            struct scsi_disk *sdkp;
2123    
2124            async_synchronize_full();
2125            sdkp = dev_get_drvdata(dev);
2126            blk_queue_prep_rq(sdkp->device->request_queue, scsi_prep_fn);
2127            device_del(&sdkp->dev);
2128            del_gendisk(sdkp->disk);
2129            sd_shutdown(dev);
(gdb)


'리눅스 > 커널' 카테고리의 다른 글

syslog LOCAL7  (0) 2014.08.28
Dentry cache hash table 사이즈  (0) 2014.04.08
Memory 정보 출력되는 곳  (0) 2014.04.07
driver 초기화 시에 쓰이는 module_init  (0) 2014.04.04
Machine 이름 바꾸기  (0) 2014.04.03
Posted by code cat
리눅스2014. 9. 15. 17:36

upstart.ubuntu.com/download에서 맞는 버전?을 다운받자

인스톨 할라고 ./configure를 돌리면 package dependency때문에 에러를 뿜어대는데,

libnih-dbus-dev
libdbus-glib-1-dev
libjson0-dev

이정도까지만 받으면 ./configure는 문제 없다.

근데 make에서 에러나네.. 이건 좀 더 봐야겠다.

Posted by code cat

cscope toolman page




NAME

       cscope - interactively examine a C program


SYNOPSIS

       cscope [ options ] [ C source files ]


DESCRIPTION

       Cscope  is  an interactive screen-oriented tool that helps
       you:

              Learn how a C program works without  endless  flip-
              ping through a thick listing.

              Locate  the  section of code to change to fix a bug
              without having to learn the entire program.

              Examine the effect of a  proposed  change  such  as
              adding a value to an enum variable.

              Verify  that  a  change has been made in all source
              files such as adding an  argument  to  an  existing
              function.

              Rename a global variable in all source files.

              Change  a  constant  to  a  preprocessor  symbol in
              selected lines of files.

       It is designed to answer questions like:

              Where is this symbol used?
              Where is it defined?
              Where did this variable get its value?
              What is this global symbol's definition?
              Where is this function in the source files?
              What functions call this function?
              What functions are called by this function?
              Where does the message "out of space" come from?
              Where is this source file in the directory structure?
              What files include this header file?

       Cscope answers these questions from a symbol database that
       it  builds  the first time it is used on the source files.
       On a subsequent call, cscope rebuilds the database only if
       a  source  file has changed or the list of source files is
       different.  When the database is rebuilt the data for  the
       unchanged  files  is  copied  from the old database, which
       makes rebuilding much faster than the initial build.

       After the database is  ready  cscope  will  display  these
       input fields:

              Find this C symbol:
              Find this definition:
              Find functions called by this function:
              Find functions calling this function:
              Find assignments to:
              Change this grep pattern:
              Find this egrep pattern:
              Find this file:
              Find files #including this file:

       Press  the TAB key repeatedly to move to the desired input
       field, type the pattern to search for, and then press  the
       RETURN  key.  For the first 5 and last 2 input fields, the
       pattern can be a regcmp(3X) regular  expression.   If  the
       search  is  successful,  you can use these command charac-
       ters:

       1-9    Edit the file containing the displayed line.
       space  Display next lines.
       +      Display next lines.
       -      Display previous lines.
       ^E     Edit all lines.
       >      Write all lines to a file.
       >>     Append all lines to a file.
       <      Read lines from a file.
       ^      Filter all lines through a shell command.
       |      Pipe all lines to a shell command.

       At any time you can use these command characters:

       ^P     Move to the previous input field.
       ^A     Search again with the last pattern typed.
       ^B     Recall previous input field and search pattern.
       ^F     Recall next input field and search pattern.
       ^C     Toggle ignore/use letter case when searching.
       ^R     Rebuild the symbol database.
       !      Start an interactive shell (type ^D  to  return  to
              cscope).
       ^L     Redraw the screen.
       ?      Display this list of commands.
       ^D     Exit cscope.

       Note:  If  the  first character of the pattern you want to
       search for matches one of the above  commands,  type  a  \
       character first.

   Changing Text
       After  typing  the grep(1) pattern to be searched for, you
       will be prompted for the replacement text, then the  lines
       containing  the pattern will be displayed.  You select the
       lines to be changed with these command characters:

       1-9    Mark or unmark the line to be changed.
       *      Mark or unmark all displayed lines to be changed.
       space  Display next lines.
       +      Display next lines.
       -      Display previous lines.
       a      Mark or unmark all lines to be changed.
       ^D     Change the marked lines and exit.
       RETURN Exit without changing the marked lines.
       !      Start an interactive shell (type ^D  to  return  to
              cscope).
       ^L     Redraw the screen.
       ?      Display this list of commands.

   Special Keys
       If your keyboard has arrow keys that work in vi(1) you can
       use them to move around the input  fields.   The  up-arrow
       key  is useful to move to the previous input field instead
       of using the TAB key repeatedly.  If you have  the  CLEAR,
       NEXT,  or PREV keys they will act as the ^L, +, and - com-
       mands respectively.

   Mouse
       If you have an AT&T  5620/630/730  terminal  and  use  the
       emacsterm(1),  myx(1),  or viterm(1) terminal programs; or
       use the X Window System and the  etermx(1)  terminal  pro-
       gram;  or  SunView  and the eterm(1) terminal program; you
       can use your mouse with cscope.  If  you  use  the  myx(1)
       terminal  program,  set  the MOUSE environment variable to
       myx (see ENVIRONMENT VARIABLES).

       Point with the mouse and click button 1  to  move  to  the
       desired  input  field, type the pattern to search for, and
       then press the RETURN key.  If the search  is  successful,
       you  can  edit  the  file  containing  a displayed line by
       pointing with the  mouse  and  clicking  button  1.   When
       changing  text, point with the mouse and click button 1 to
       mark or unmark the line to be changed.  Press mouse button
       2 to get a menu of commands.

   Options
       When invoking cscope you can use these options:

       -a       When using the "Find this egrep pattern:" search,
                ask for a regular expression describing the  sub-
                set of files to search.  If no expression is sup-
                plied, all files known to  cscope  are  searched.
                This option is particularly useful for very large
                software systems where thousands of source  files
                are used.  In such systems the set of files to be
                searched is a small subset of  the  total.   This
                option  is  also  available as the 'a' command in
                the command-line interface.  The -l or -L options
                turn off this option.
       -b       Build the database only.
       -c       Use  only  ASCII characters in the database file,
                that is, do not compress the data.
       -C       Ignore letter case when searching.
       -d       Do not update the database.
       -e       Suppress the ^E command prompt between files.
       -f file  Use file as the database file name instead of the
                default (cscope.out).
       -F file  Read  symbol reference lines from file, just like
                the < command.
       -i file  Read any -I, -p, -q, and -T options and the  list
                of  source files from file instead of the default
                (cscope.files).
       -I dir   Look in dir for #include files.  If you  will  be
                editing these files, use the -s option instead so
                the rebuild (^R) command will  notice  they  have
                changed.
       -k       Kernel  Mode  turns  off  the  use of the default
                include dir (usually /usr/include) when  building
                the database, since kernel source trees generally
                do not use it.
       -l       Line-oriented interface (see Calling Cscope  with
                a Line-Oriented Interface).
       -L       Do a single search with line-oriented output when
                used with the -n pattern option.
       -o       Display OGS book and subsystem names.
       -p n     Display the last n file path  components  instead
                of  the  default  (1).   Use 0 to not display the
                file name at all.
       -P path  Prepend path to relative file  names  in  a  pre-
                built  database  so  you do not have to change to
                the directory where the database was built.  This
                option  is only valid with the -d option.  Do not
                use this option  if  a  viewpath  was  used  when
                building the database (see Viewpath subsection of
                EXAMPLES section).
       -q       Build an inverted index for quick  symbol  seach-
                ing.   If you use this option with the -f option,
                you must use -f on every call to cscope,  includ-
                ing building the database, because it changes the
                names of the inverted index files.

                NOTE: This is not available on MSDOS or  MS  Win-
                dows versions.
       -r       Require  pressing the RETURN key after typing the
                selection digit(s) for a displayed line  to  edit
                the  file  containing  it,  which  allows as many
                lines as possible to be displayed.
       -R       Recurse subdirectories during search  for  source
                files.

       -s dir   Look  in  dir  for additional source files.  This
                option is ignored if source files  are  given  on
                the command line.
       -t hours No  activity  timeout  in  hours  (minimum  of  4
                hours).  Removing a database will not release the
                disk space if a cscope process has the file open,
                so a project can use this option in its script to
                call  cscope  on  a  large database so unattended
                cscope processes will exit overnight.
       -T       Use only the  first  eight  characters  to  match
                against C symbols.  A regular expression contain-
                ing special characters other than  a  period  (.)
                will  not  match any symbol if its minimum length
                is greater than eight characters.
       -u       Unconditionally build the database  (assume  that
                all files have changed).
       -U       Do  not  check file time stamps (assume that some
                files have changed).
       -x ext   Use the extended menu with option ext.  When  ext
                is  set to "c", cscope will emulate ccalls(1) and
                will display the following input  fields  instead
                of the normal menu:
              Find this type definition:
              Find this preprocessor definition:
              Find parameters of this function:
              Find functions calling this function:
              Find this global definition:
              Find this local definition:
              Find this structure definition:
              Find this file:
              Find this preprocessor include:
       When  ext  is  set to "s", system calls are ignored in the
       output.  To combine extension options,  use  concatenation
       e.g. "cs".  See cscalls(1).
       -n pattern
              Go to input field n (counting from 0) and find pat-
              tern.  The input field number is the  line  number,
              counting  from  0,  of the search type displayed on
              the screen. That is, given the following table

             +----------------------------------------------------+
             |LINE                   SEARCH TYPE                  |
             +----------------------------------------------------+
             | 0     Find this C symbol:                          |
             | 1     Find this definition:                        |
             | 2     Find functions called by this function:      |
             | 3     Find functions calling this function:        |
             | 4     Find assignments to:                         |
             | 5     Change this grep pattern:                    |
             | 6     Find this egrep pattern:                     |
             | 7     Find this file:                              |
             | 8     Find files #including this file:             |
             +----------------------------------------------------+
             |           (Used by samuel and cdb only)            |
             | 9     Find all function/class definitions (samuel) |
             | :     Find all function/class definitions (cdb)    |
             +----------------------------------------------------+
             |      (Used by ccalls with the extended menu)       |
             | 0     Find this type definition:                   |
             | 1     Find this preprocessor definition:           |
             | 2     Find parameters of this function:            |
             | 3     Find functions calling this function:        |
             | 4     Find this global definition:                 |
             | 5     Find this local definition:                  |
             | 6     Find this structure definition:              |
             | 7     Find this file:                              |
             | 8     Find this preprocessor include:              |
             | 9     Find definition of this function:            |
             | :     Find all function/class definitions:         |
             +----------------------------------------------------+
       If you wanted to "Find assignments to", then you would use
       "-4 pattern"

       The  -c, -k, -I, -p, -q, and -T options can also be in the
       cscope.files file.  See below for common uses of  most  of
       these options.


EXAMPLES

   Calling Cscope from the Shell
       To use cscope on all the C, lex, yacc, breakpoint listing,
       Ingres(TM), and SDL files in the  current  directory  just
       type

              cscope

       You  can  use  cscope on particular files if you have more
       than one program in the  same  directory.   The  above  is
       equivalent to

              cscope *.[chlyCGHL] *.bp *.q[ch] *.pr *.sd

       If  you  want to use cscope on all the source files in the
       current and a few other directories, use the -s option  to
       give the other directory names, e.g.
              cscope -s ../common,../../common

       If  you  want to use cscope on all the source files in the
       current and lower level directories, first create  a  list
       of the files with

              find . -name '*.[chlyCGHL]' -print >cscope.files

       and then type

              cscope

       Cscope  will  look  up  the  viewpath for the cscope.files
       file, so you can put it under change management to prevent
       accidental destruction.

       If  a  file #include's files that are in directories other
       than the  current  directory  or  the  standard  directory
       (/usr/include), use the -I option just like when using the
       cc(1) command

              cscope -I../hdr -I../../hdr

       If you will be editing these  files,  use  the  -s  option
       instead  so the rebuild (^R) command will notice they have
       changed.

       If files may have the same base name, you will want to use
       the  -p  option to display the last n file path components
       instead of the default (1).

       If you use a compiler that  does  not  support  flexnames,
       that is, symbol name differences past eight characters are
       ignored, you will want to use the -T option to have cscope
       do the same.

       You can put -c, -k, -I, -p, -q, and -T options in the file
       containing the list of source  files  (see  above).   This
       shortens  the  cscope  command line and makes it easier to
       call cscope from an editor.

       If you use cscope on thousands of source files, use the -b
       option  to only build the database so you can do run it in
       the background with a batch(1) or at(1) job.

              echo 'cscope -b' | batch

       Use the -d option on subsequent calls to cscope

              cscope -d

       to avoid the time spent checking if the database is out of
       date, which can be significant.

       If the source files change infrequently, you can get quick
       symbol searching by building  the  database  with  the  -q
       option.   For  a  very  large database you will be able to
       find a symbol in a few  seconds  vs.  several  minutes  if
       built  without  -q,  at the expense of about twice as much
       database disk space and build CPU  time.   Updating  a  -q
       database  takes  about as half as long as building it.  It
       contains binary numbers, so it is  portable  only  between
       machines  with  the  same byte order and scalar-type sizes
       (such as int, long, short, char, and pointer).  Note  that
       3B,  Amdahl/IBM,  and MC680x0-based machines like Suns all
       have the same byte order.

       The -q option makes it practical  to  have  databases  for
       entire  projects.   If you try to build a project database
       and get a "File too large" message, you need to  get  your
       login's  ulimit  (file  size  limit) raised by your system
       administrator.  If you get the "No space left  on  device"
       message  you  will  have  to  use  a file system with more
       space.  You can change the temporary file system  by  set-
       ting  the TMPDIR environment variable.  If you have enough
       space to build the database but not to  rebuild  it  after
       some  files  have changed, try removing the inverted index
       cscope.in.out and cscope.po.out files.  If you still don't
       have  enough space to rebuild, you will have to remove the
       cscope.out file.

       If you want to use cscope separately on  several  programs
       in the same directory structure, but keep the databases in
       the same (top) directory, use the -f  and  -i  options  to
       rename the cscope.out and cscope.files file, respectively,
       e.g.

              find dir1 -name '*.[chlyCGHL]' -print >dir1.files
              find dir2 -name '*.[chlyCGHL]' -print >dir2.files
              cscope -b -f dir1.db -i dir1.files
              cscope -b -f dir2.db -i dir2.files

       and call cscope with

              cscope -d -f dir2.db

       Note that options used only when  building  the  database,
       such  as  -i, are not needed with the -d option.  If other
       people are going to use these databases, you  will  should
       provide  a  shell  script  to call cscope with the correct
       options.  If a viewpath (see Viewpath below) was not  used
       when building the database, then use the -P option to give
       the path to relative file names so  the  script  does  not
       have  to  change  to  the directory where the database was
       built, which can confuse users.

   Calling Cscope with Compressed Databases
       To call cscope with a database which has  been  compressed
       using gzip, bzip2 or i<I>p just type

              cscope -d

       The  compressed database will be uncompressed into a cache
       directory before being opened by cscope.  If the  database
       already exists in the cache, then no uncompressing will be
       performed and the existing database in the cache  will  be
       used.   The uncompressed database will be placed in a sub-
       directory in the cache, which derives its  name  from  the
       last two directories of the database filename.  This means
       different databases  will  be  stored  separately  in  the
       cache.

       If  a  compressed  database exists in the VPATH and in the
       current directory, then  following  normal  VPATH  conven-
       tions,  the  database  in  the  current  directory will be
       uncompressed into the cache.  If an uncompressed  database
       exists before a compressed database in the VPATH, then the
       uncompressed database will be accessed  as  normal.   How-
       ever,  if the cscope.out file has been removed in the cur-
       rent directory but the inverted indexes have been not been
       deleted,  then  be  warned that cscope may try to open the
       database in the cache and the inverted indexes in the cur-
       rent  directory.   If  this  is not the desired behaviour,
       then please remove the  unwanted  inverted  indexes  along
       with the uncompressed database.

       When  building  the  database,  if  a  compressed database
       exists in the VPATH, then cscope will uncompress it in the
       current directory before attempting to build the database.
       This allows the database to be built  and  compressed  and
       when  the  database  is updated, cscope will automatically
       uncompress the database ready for update.

       The compression of databases is not implemented by cscope.

       Control  of  the cache is suggested to be performed by the
       system administrator.  The file /etc/cscopemaxcache can be
       created,  containing  the  maximum  number of files in the
       cache.  If the cache size has been exceeded,  then  cscope
       will  attempt to remove files from the cache before uncom-
       pressing a new database.  If /etc/cscopemaxcache does  not
       exist,  then  no limit on the number of files in the cache
       will be applied,  except  for  the  following  check.   If
       TMPDIR  is more than 50% full, then cscope will attempt to
       remove  1  sub-directory  before   uncompressing   a   new
       database.

   Calling Cscope from an Editor
       To call cscope from within vi(1) type :!cscope followed by
       any  options  or  file  arguments.   From  emacs(1)   type
       M-!cscope  followed  by  any  file arguments.  There is an
       emacs(1) macro for the two most common  calls  to  cscope.
       Type  M-X  to call cscope with no file arguments, and type
       ^UM-X to call cscope with the -d option to not update  the
       database.   If nothing happens when you type M-X, add this
       line to your $HOME/.emacs_init and/or $HOME/.ve_init file:

              ^X^L~EMACS/macros/basic

   Stacking Cscope and Editor Calls
       When  cscope  puts you in the editor to display one symbol
       reference and you see another symbol  of  interest,  don't
       leave  the  editor, just call cscope again from within the
       editor.  In this way you can stack cscope and editor calls
       so  you can go off on a tangent, and then back up to where
       you were by  exiting  the  tangential  cscope  and  editor
       calls.

       For  example,  when  learning  a program you will probably
       have cscope find the main function  and  display  it  with
       your  editor.   You can visualize this as an inverse stack
       of calls:

              cscope: find and display main()
                   editor: display first lines of main()

       You may then see that main calls an  initialize  function.
       Rather  than exiting the editor to go back to cscope, call
       cscope again from within the editor to find the initialize
       function  and  display  it with another editor call.  Your
       stack of calls now looks like this:

              cscope: find and display main()
                   editor: display first lines of main()
                                                                  cscope: find and display initialize()
                                                                  editor: display first lines of initialize()

       When you are through looking at  this  function,  you  can
       exit this second editor call, exit the second cscope call,
       and you are back in the first editor call that is display-
       ing the main function.  You are now back to:

              cscope: find and display main()
                   editor: display first lines of main()

       and can continue reading the main function.

   Boolean Searching
       You  can  do the equivalent of Boolean or logical AND, OR,
       and NOT operations on searches with the ^, >,  >>,  and  <
       commands.   For  example,  if you wanted all references to
       the symbol stderr in file invlib.c, search for the  symbol
       and then use the ^ command with shell command

              grep invlib.c

       If you wanted all the references not in this file, use the
       grep(1) -v option.  If you wanted all the lines where sym-
       bols  stderr or stdout are used, search for the first sym-
       bol, write the references to a file with  the  >  command,
       search for the second symbol, append the references to the
       same file with the >> command, read the file  with  the  <
       command, and get rid of duplicate lines with the ^ command
       using the shell command

              sort | uniq

       Note that all <global> references will no longer be  first
       because the references will be sorted by file name.

   Viewpath
       As  described  above,  cscope searches for source files in
       the current directory by default.  When the VPATH environ-
       ment  variable is set, cscope searches for source files in
       directories that comprise your viewpath.  A viewpath is an
       ordered  list  of  directories, each of which has the same
       directory structure below it.

       For example, suppose you are part of a  software  project.
       There  is  an  official set of source files in directories
       below /fs1/ofc and each user has some matching directories
       under  their  home directory ($HOME).  If you make changes
       to the software system, you may have copies of just  those
       files  you are changing in $HOME/src/cmd/prog1.  The offi-
       cial versions of  the  entire  program  can  be  found  in
       /fs1/ofc/src/cmd/prog1.

       Suppose  you  use cscope to browse through the three files
       that comprise prog1, namely f1.c,  f2.c,  and  f3.c.   You
       would set VPATH to $HOME and /fs1/ofc, and export it:

              VPATH=$HOME:/fs1/ofc
              export VPATH

       You    would    then    make    your   current   directory
       $HOME/src/cmd/prog1 and invoke cscope:

              cd $HOME/src/cmd/prog1
              cscope

       Cscope will locate all files in  the  viewpath.   In  case
       duplicates  are  found,  cscope uses the file whose parent
       directory appears earlier in VPATH.  Thus if  f2.c  is  in
       your  directory  (and  all three files are in the official
       directory), cscope will use f2.c from your  directory  and
       f1.c and f3.c from the official directory.

       The  first  directory  in  VPATH must be a prefix (usually
       $HOME) of the directory you  will  be  working  in.   Each
       colon-separated  directory  in  VPATH must be a full path,
       that is, it must start with a slash (/).

   Calling Cscope with a Line-Oriented Interface
       The -l option lets you use cscope where a  screen-oriented
       interface  would  not be useful, e.g. from another screen-
       oriented program.  Cscope will prompt with ">> "  when  it
       is  ready for an input line starting with the field number
       (counting from 0) immediately followed by the search  pat-
       tern,  e.g. "1main" finds the definition of the main func-
       tion.  Field number 9 followed by any pattern, e.g.  "9a",
       finds all function and C++ class definitions.  If you just
       want a single search, instead of the -l option use the  -L
       and  -n  pattern  options,  and  you  won't  get the ">> "
       prompt.  For -l, cscope outputs the  number  of  reference
       lines

              cscope: 2 lines

       For each reference found, cscope outputs a line consisting
       of the file name, function name,  line  number,  and  line
       text, separated by spaces, e.g.

              main.c main 161 main(argc, argv)

       Note that as of this time, the file name, and the function
       name must not have embedded spaces (such as  what  happens
       on Microsoft boxes).

       Also  note that the editor is not called to display a sin-
       gle reference, unlike the screen-oriented interface.   You
       can  use  the  'c' command to toggle ignoring/using letter
       case when  searching,  the  'r'  command  to  rebuild  the
       database,  and  the 'P' command to print the path to rela-
       tive file names (either the -P option  path  or  the  full
       current directory path).  Cscope will quit when it detects
       end-of-file, or when the first character of an input  line
       is ^D or 'q'.

       This  option  allows you to write a program like samuel(1)
       that uses cscope to look up symbol information.  The  pro-
       gram  can  send  search  commands  to  cscope and read the
       results.  The xcscope macro package available for emacs(1)
       uses  this  option  to look up C symbols.  This option may
       also be useful for terminals not supported by  terminfo(4)
       or for sight-impaired users of printing terminals.

       The  following table lists the commands available in line-
       oriented mode (-l). If a string is specified,  there  must
       be  no  whitespace  between  the  command  letter  and the
       string. The string is shown here as '<str>' for  readabil-
       ity but the '<>' chars are not used.

       +----------------------------------------------------------+
       | CMD                          ACTION                      |
       +----------------------------------------------------------+
       |0<str>   Find this C symbol:                              |
       |1<str>   Find this definition:                            |
       |2<str>   Find functions called by this function:          |
       |3<str>   Find functions calling this function:            |
       |4<str>   Find assignments to:                             |
       |5<str>   Change this grep pattern:                        |
       |6<str>   Find this egrep pattern:                         |
       |7<str>   Find this file:                                  |
       |8<str>   Find files #including this file:                 |
       +----------------------------------------------------------+
       |9<str>   Find all function/class definitions (samuel)     |
       |:<str>   Find all function/class definitions (cdb)        |
       +----------------------------------------------------------+
       |a<str>   Set  the directory search pattern for 'Find this |
       |         egrep pattern'.  This is the equivalent  of  the |
       |         command line option of -a                        |
       |^<str>   Set the directory filter pattern for all queries |
       |c        Toggle Caseless mode                             |
       |C        Clear file names                                 |
       |F        Add file name                                    |
       |P        Print the path to the files                      |
       |r        rebuild the database cscope style                |
       |R        rebuild the database samuel style                |
       +----------------------------------------------------------+
       |q        Quit                                             |
       +----------------------------------------------------------+
       |         (used by ccalls with the extended menu)          |
       |0<str>   Find this type definition:                       |
       |1<str>   Find this preprocessor definition:               |
       |2<str>   Find parameters of this function:                |
       |3<str>   Find functions calling this function:            |
       |4<str>   Find this global definition:                     |
       |5<str>   Find this local definition:                      |
       |6<str>   Find this structure definition:                  |
       |7<str>   Find this file:                                  |
       |8<str>   Find this preprocessor include:                  |
       |9<str>   Find definition of this function:                |
       |:<str>   Find all function/class definitions:             |
       +----------------------------------------------------------+
       If you wanted to "Find assignments to", then you would use
       "-4pattern"

       The -c, -k, -I, -p, -q, and -T options can also be in  the
       cscope.files  file.   See below for common uses of most of
       these options.


SYMBOL DATABASE FORMAT

       The symbol database (cscope.out) file format is

              <header>
              <first file symbol data>
                     ...
              <last file symbol data>
              <trailer>

       The header is a single line

              cscope <format version> <current dir> [-c] [-q <symbols>] [-T] <trailer offset>

       The format version is first number in the  cscope  version
       that  wrote the database, e.g. the format version is 9 for
       cscope version 9.14.  When the format  version  number  in
       the  cscope  program is greater than that in the database,
       the entire database will be rebuilt when any part of it is
       out  of date.  The current directory is either a full path
       or prefixed by $HOME, allowing  the  user's  login  to  be
       moved  to  a  different file system without rebuilding the
       database.  The trailer offset is the  fseek(3)  offset  of
       the trailer.

       The header is followed by the symbol data for each file in
       alphabetical order.  This  allows  fast  updating  of  the
       database  when  only a few files have changed, because the
       old database is copied to the new database up to the point
       of  the changed file.  Then the changed file's symbol data
       is added to the new database, the old database  is  copied
       up to the next changed file, and so on.

       Two  data  compression  techniques  are used on the symbol
       data: (1) keywords and trailing syntax  are  converted  to
       control  characters,  and  (2)  common digraphs (character
       pairs) are compressed to meta-characters (characters  with
       the  eight  bit set).  Since this makes it hard to read or
       postprocess the database, you  may  want  to  use  the  -c
       option  to  turn off data compression when the database is
       built.

       The symbol data for each file starts with

              <file mark><file path>
              <empty line>

       and for each source line containing a symbol

              <line number><blank><non-symbol text>
              <optional mark><symbol>
              <non-symbol text>
              repeat above 2 lines as necessary
              <empty line>

       Leading and trailing white space in  the  source  line  is
       removed.   Tabs are changed to blanks, and multiple blanks
       are squeezed to a single  blank,  even  in  character  and
       string  constants.  The symbol data for the last file ends
       with

              <file mark>

       A mark is a tab followed by one of these characters:

              Char   Meaning

              @      file
              $      function definition
              `      function call
              }      function end
              #      #define
              )      #define end
              ~      #include
              =      direct assignment, increment, or decrement
              ;      enum/struct/union definition end
              c      class definition
              e      enum definition
              g      other global definition
              l      function/block local definition
              m      global enum/struct/union member definition
              p      function parameter definition
              s      struct definition
              t      typedef definition
              u      union definition

       A #include mark is followed by '<' or '"' to determine  if
       the  current  directory  should  be searched.  An untagged
       enum/struct/union definition has a mark without  a  symbol
       name so its beginning can be found.

       Historical note: The first three mark characters were cho-
       sen because they are not used by the C language, but since
       they  can  appear in a string constant, the tab prefix was
       added.  They were never changed to more meaningful charac-
       ters  because  other programs had been written to read the
       database file.

       The trailer contains lists of source directories,  include
       directories, and source files; its format is

              <number of viewpath nodes>
              <first directory in viewpath, if any>
                     ...
              <last directory in viewpath>
              <number of source directories>
              <first source directory path (always .)>
                     ...
              <last source directory path>
              <number of include directories>
              <first include directory path>
                     ...

              <last include directory path (normally /usr/include)>
              <number of source and included files>
              <length of string space needed>
              <first file path>
                     ...
              <last file path>

       Low  level access to the symbol database was traditionally
       provided by ccalls.  Cscope now emulates this  functional-
       ity  with the -x option so that everyone can get access to
       the extra information stored in the database.  One of  the
       main  differences  in  the  output is that a new column is
       added, entitled "Ccalls", which contains the  symbol  name
       from  the  database.  This information was previously only
       extracted as part of the  code  fragment  associated  with
       each  set of results.  As such, the new output format when
       using the -x option consists of the  file  name,  function
       name, line number, ccalls information and line text, sepa-
       rated by spaces.


ENVIRONMENT VARIABLES

       CSCOPEOPTIONS
                    Cscope options.
       EDITOR       Your editor, which defaults to vi(1).
       HOME         Your home directory, which  is  automatically
                    set when you login.
       MOUSE        Set to myx if that is your 5620 terminal pro-
                    gram.
       MOUSEMENU    Set to none if you  do  not  want  cscope  to
                    switch to its mouse menu so you can have your
                    own customized Cscope submenu  on  the  shell
                    menu.
       SHELL        Your shell, which defaults to sh(1).
       TERM         Your  terminal  type,  which must be a screen
                    terminal.
       TERMINFO     Terminal  information  directory  full   path
                    name.   If  your terminal is not in the stan-
                    dard terminfo directory, see  curses(3X)  and
                    terminfo(4) for how to make your own terminal
                    description.
       TMPDIR       Temporary file directory, which  defaults  to
                    /usr/tmp.
       VIEWER       Your  file  display  program, which overrides
                    EDITOR (see above).
       VPATH        Viewpath (see Viewpath subsection of EXAMPLES
                    section).

       To set a variable such as EDITOR to a value such as emacs,
       put this in your .profile:

              export EDITOR
              EDITOR=emacs


FILES

       cscope.files  Default file containing -c, -k, -I, -p,  -q,
                     and  -T options and the list of source files
                     (overridden by the -i option).
       cscope.out    Default symbol database file (overridden  by
                     the  -f  option).   It  is  put in your home
                     directory if it cannot  be  created  in  the
                     current directory.
       cscope.in.out
       cscope.po.out Default  files containing the inverted index
                     for quick symbol searching (-q option).   If
                     you   use   the  -f  option  to  rename  the
                     cscope.out file name, .in and  .po  will  be
                     suffixed  to  its  base name to create these
                     file names.
       ncscope*.out  Temporary files containing the new  database
                     before it replaces the old database.  If you
                     use the -f option to rename  the  cscope.out
                     file name, an n will be prefixed to its base
                     name to create these file names.
       /usr/include  Standard directory for #include files.


SEE ALSO

       cscalls(1), grep(1), regcmp(3X),  slimmer(1)


WARNINGS

       Spaces in the displayed source line text for  a  reference
       may  not  exactly  match the actual source line because of
       the data compression used to store them in  the  database.
       Leading   spaces  and  tab  characters  are  removed,  and
       sequences of them are replaced with a single  space,  even
       inside a quoted string.  A space may also be added after a
       keyword, e.g. "(void)" will be displayed as "(void )".

       The Function column of the search  output  for  the  "Find
       functions  called by this function:" input field will only
       display the first function called in the  line,  that  is,
       for this function

              e()
              {
                     return(f() + g());
              }

       the display would be

              Functions called by this function: e

                File Function Line
                a.c  f        3 return(f() + g());


BUGS

   C Parsing Bugs
       Occasionally,  a  function  definition  or call may not be
       recognized because of braces inside #if statements.  Simi-
       larly, the use of a variable may be incorrectly recognized
       as a definition.

       A typedef name preceding a preprocessor statement will  be
       incorrectly recognized as a global definition, e.g.

              LDFILE *
              #if AR16WR

       Preprocessor  statements  can also prevent the recognition
       of a global definition, e.g.

              char flag
              #ifdef ALLOCATE_STORAGE
                     = -1
              #endif
              ;

       A function definition will not be recognized  if  the  '('
       after the function name is on the next line, e.g.

              f
              ()
              {

   C++ Parsing Bugs
       Cscope  recognizes  C++  classes  by looking for the class
       keyword, but doesn't recognize that a  struct  is  also  a
       class, so it doesn't recognize inline member function def-
       initions in a structure.  It also doesn't expect the class
       keyword  in a typedef, so it incorrectly recognizes X as a
       definition in

              typedef class X * Y;

       It also doesn't recognize operator function definitions

              Bool Feature::operator==(const Feature & other) {

       and function definitions with a function pointer argument

              ParseTable::Recognizes(int startState, char *pattern,
                     int finishState, void (*FinalAction)(char *)) {


AUTHOR

       Joe Steffen


Man(1) output converted with man2html
Posted by code cat
리눅스2014. 9. 4. 09:26

환경변수를 설정할 때, 홈 디렉터리에 있는 .pam_environment에 추가해 주면 된다.

형식은 다음과 같다. 


VARIABLE [DEFAULT=[value]] [OVERRIDE=[value]]

 

디폴트로 들어 있는 환경변수는 다음과 같다.

  LANGUAGE=ko:en

  LANG=ko_KR.UTF-8

  LC_NUMERIC=ko_KR.UTF-8

  LC_TIME=ko_KR.UTF-8

  LC_MONETARY=ko_KR.UTF-8

  LC_PAPER=ko_KR.UTF-8

  LC_NAME=ko_KR.UTF-8

  LC_ADDRESS=ko_KR.UTF-8

  LC_TELEPHONE=ko_KR.UTF-8

  LC_MEASUREMENT=ko_KR.UTF-8

  LC_IDENTIFICATION=ko_KR.UTF-8

  PAPERSIZE=a4



여기다 필요한 변수들(예: CATALINA_HOME, JAVA_HOME 등..)을 추가해 주면 된다.

Posted by code cat
리눅스2014. 9. 2. 16:20


리눅스에서 wireshark를 실행하여 캡쳐하려 하면 다음과 같은 에러를 볼 수 있다.

"there are no interfaces on which a capture can be done"

그럴 땐, 터미널을 띄워서 다음과 같이 입력해 주자.

setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/sbin/dumpcap"

이제 wireshark를 끄고 다시 실행해 보면 캡쳐 할 때 위와 같은 메세지가 안 뜰 것이다.

'리눅스' 카테고리의 다른 글

upstart 설치하기  (0) 2014.09.15
.pam_environment  (0) 2014.09.04
samba 포트 포워딩  (0) 2014.08.26
파일 캐릭터 인코딩 바꾸기  (0) 2014.08.02
GMainLoop 동작방식  (0) 2014.07.14
Posted by code cat

.vim/plugin  에 우선 cscope_maps.vim & cscope_quickfix.vim 을 추가하자.

(http://www.vim.org/scripts/script.php?script_id=862)


그리고 .vimrc  에 다음과 같이 추가하자.


:help cscope 을쳐 서 커맨 드사용법을 숙지하거나,  찾고자 하 는 symbol 위에서 Ctrl+\ + querytype 을 쓰면 된다. 

Posted by code cat