Re: I am confused after reading codes of PostgreSQL three week

Поиск
Список
Период
Сортировка
От Nicolas Barbier
Тема Re: I am confused after reading codes of PostgreSQL three week
Дата
Msg-id AANLkTinWbO2MP0wN5TcBfAoOGJxRsbQk2zue7KCOkunR@mail.gmail.com
обсуждение исходный текст
Ответ на Re: I am confused after reading codes of PostgreSQL three week  (hom <obsidianhom@gmail.com>)
Ответы Re: I am confused after reading codes of PostgreSQL three week  (hom <obsidianhom@gmail.com>)
Список pgsql-hackers
2011/3/20 hom <obsidianhom@gmail.com>:

> I trace into scan.c because I want to known how the paser tree is
> built and I debug the source step by step.

I suggest you learn how flex/bison work first. The contents of the *.c
files generated by flex/bison are not generally supposed to be
interpreted by humans, rather you should read their original sources
(*.l and *.y).

> Then the eclipse pick up the scan.I and the excute order does not
> match the code.

Eclipse seems to understand that any code corresponding to the
generated .c file actually originates in the .l file, but apparently
fails to match (some of?) the line numbers. OTOH, I cannot really
imagine how it is supposed to match them as long as you are not
executing lines that are literally copied from the .l file (e.g., as
long as the lexer or parser code itself is being executed), so that
may be normal.

Again: Do not try to read the generated .c files, but rather read the
corresponding .l and .y files. The tarballs may include those
generated .c files, but as you will find out when checking out the
repository itself, they are not really considered "source" (i.e., they
are not included). When debugging, skip over the lexer and parser code
itself, just put your breakpoints in the C code in the .l and .y files
(I hope Eclipse might match *those* line numbers a least, and make the
breakpoints work).

Nicolas


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: I am confused after reading codes of PostgreSQL three week
Следующее
От: Robert Haas
Дата:
Сообщение: Re: VACUUM FULL deadlock with backend startup