Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicon Debug Adapter V1 #353

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Conversation

mstreeter10
Copy link
Contributor

No description provided.

@mstreeter10 mstreeter10 force-pushed the uda_changes branch 3 times, most recently from fdda26a to b01f820 Compare January 4, 2024 04:43
uni/udb/breakpoint.icn Outdated Show resolved Hide resolved
uni/udb/console.icn Outdated Show resolved Hide resolved
uni/udb/state.icn Outdated Show resolved Hide resolved
uni/udb/state.icn Outdated Show resolved Hide resolved
uni/udb/state.icn Outdated Show resolved Hide resolved
uni/udb/breakpoint.icn Outdated Show resolved Hide resolved
uni/udb/breakpoint.icn Outdated Show resolved Hide resolved
uni/udb/breakpoint.icn Outdated Show resolved Hide resolved
uni/udb/breakpoint.icn Outdated Show resolved Hide resolved
uni/udb/breakpoint.icn Outdated Show resolved Hide resolved
@mstreeter10 mstreeter10 force-pushed the uda_changes branch 3 times, most recently from e978a6e to 6da264d Compare January 7, 2024 19:50
@Jafaral Jafaral force-pushed the uda_changes branch 3 times, most recently from fea1c34 to d55ba84 Compare January 9, 2024 01:40
@Jafaral Jafaral force-pushed the uda_changes branch 2 times, most recently from 3e535a2 to 632ff29 Compare January 9, 2024 06:01
Copy link
Member

@Jafaral Jafaral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor formatting comments

uni/udb/breakpoint.icn Outdated Show resolved Hide resolved
Comment on lines 606 to 607
msg := "\n No breakpoints are available to be deleted."
setResultTable(resultTable, "No breakpoint are available to be deleted", "__false__")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation is off

Comment on lines 631 to 632
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

Comment on lines 664 to 665
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

Comment on lines 667 to 668
msg := "\n All breakpoints are enabled; ("||j||" total)."
setResultTable(resultTable, "All breakpoints are enabled; ("||j||" total)", "__true__")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

uni/udb/data.icn Outdated
localsTable := table()
localsTable["type"] := "locals"

if /DState.mode | \DState.mode ~== "-adapter" then put(output,"\n Local variables:")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then... new line

uni/udb/data.icn Outdated
Comment on lines 119 to 134
if /DState.mode | \DState.mode ~== "-adapter" then put(output," "||x||" = "||image(i)||" : "|| type(i))
else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Comment on lines 30 to 31
if \DState.mode == "-adapter" then EvInit(DState.TP, DState.progSock, DState.progSock, DState.progSock) | stop("cant start evinit on " || DState.TP[1])
else EvInit(DState.TP) | stop("cant start evinit on " || DState.TP[1])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if... then
   expr
else
    expr

and we should not stop(), maybe just warn and move on?

@@ -278,4 +291,4 @@ initially()
BaseFrame := 0

Message := ""
end
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline at the end of the file

Comment on lines 58 to 61
if type(Msg) == "table" then {
if member(Msg, "code") then Msg["code"] := replacem(\Msg["code"], "\"", "\\\"")
if member(Msg, "name") then Msg["name"] := replacem(\Msg["name"], "\"", "\\\"")
if member(Msg, "consoleMsg") then Msg["consoleMsg"] := replacem(\Msg["consoleMsg"], "\"", "\\\"")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then... new line

writes(sock, utoj(Msg))
}
else {
output := table("consoleMsg", replacem(Msg, "\"", "\\\""), "state", State)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use table syntax? output := [ ...; ...; ]

@@ -160,7 +160,7 @@ method checkStep()
DState.srcFile.getSrcLine(cur_file, cur_line)
msg||:="\n "||cur_line+1||":"||
DState.srcFile.getSrcLine(cur_file, cur_line+1)
DState.Write(msg)
DState.Write(table("type", "step", "line", cur_line, "source", cur_file, "consoleMsg", msg))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

table syntax

@Jafaral
Copy link
Member

Jafaral commented Jan 23, 2024

can you define those variables for now, until the issue is fixed in the unicon compiler?

communicator.icn: "__1": undeclared identifier, procedure udap__Communicator_stack_trace
communicator.icn: "__1": undeclared identifier, procedure udap__Communicator_get_scopes
communicator.icn: "__2": undeclared identifier, procedure udap__Communicator_get_scopes
communicator.icn: "__1": undeclared identifier, procedure udap__Communicator_get_variables
communicator.icn: "__1": undeclared identifier, procedure udap__Communicator_set_breakpoints

Tableize breakpoint
Tableize stackFrame
Tableize checkstep
Tableize run
Add full reset command
Alter required response handling
Alter error handling
Update version number

Signed-off-by: mstreeter10 <[email protected]>
Attempt to start udb in adapter mode
Debuggee communication reconfiguration
Add debuggee error handling
Add debug console handling
Respond to stackTrace request
Respond to scope and variables requests
Respond to continue, next, stepIn, and stepOut
Add runInTerminal features
Add udb and socket error handling

Signed-off-by: mstreeter10 <[email protected]>

Simplify code in a few places

Signed-off-by: Jafar Al-Gharaibeh <[email protected]>
@Jafaral Jafaral merged commit e6b6522 into uniconproject:master Jan 24, 2024
16 checks passed
@mstreeter10 mstreeter10 deleted the uda_changes branch January 24, 2024 19:07
ValG4 pushed a commit to ValG4/unicon that referenced this pull request Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants