Re: Implementing SQL/PSM for PG 8.2 - debugger

From: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Neil Conway <neilc(at)samurai(dot)com>, "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Denis Lussier <denis(at)enterprisedb(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Implementing SQL/PSM for PG 8.2 - debugger
Date: 2005-06-28 12:51:21
Message-ID: Pine.LNX.4.44.0506281425100.9650-100000@kix.fsv.cvut.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 28 Jun 2005, Dave Cramer wrote:

> One thing bytecode would allow us to do is to write a debugger with
> break points etc.
>

We can write debugger with breakpoints without bytecode. Every stmt rec
can have flag if has breakpoints. No problem. I don't see any advance of
bytecode. Maybe, goto stmt is possible.

What is problem? We need synchronous comunication (message) between
backend frontend.

I have idea (in exec_stmt()

CHECK_FOR_INTERRUPTS();
if (stmt->breakpoints)
estate->debug_mode = true;
if (estate->debug_mode)
{
for (;;)
{
rc = request_command();
switch (rc)
{
case 'c': -- continue
estate->debug_mode = false;
break
case 'q':
elog(EXCEPTION, "stop debug");
break;
case 'n':
break;
case 'l':
sendstring(line(estate->src,
stmt->lineno));

Please, can somebody help me with protocol enhancing? It is mayor work on
PL/pgSQL debugger (and plperl and plpython too).

> Using a java jvm however is considerable overkill.
>
> Dave
> On 27-Jun-05, at 8:28 PM, Neil Conway wrote:
>
> > Jonah H. Harris wrote:
> >
> >> I don't recommend discussion for this in this thread, but it could
> >> also tie in with the packages support we've discussed and
> >> (although some may argue this), compiling the PL to bytecode and
> >> using that.
> >>
> >
> > How would compilation to bytecode help?
> >
> > -Neil
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/docs/faq
> >
> >
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2005-06-28 13:00:12 Re: Implementing SQL/PSM for PG 8.2 - debugger
Previous Message Bruno Wolff III 2005-06-28 12:37:20 Re: ENUM like data type