copy_command_context() is only used within OpenOCD.
 
Symbols
loading...
Files
loading...
CodeScopeDevelopment ToolsOpenOCDcopy_command_context()

copy_command_context() function

Creates a copy of an existing command context. This does not create a deep copy of the command list, so modifications in one context will affect all shared contexts. The caller must track reference counting and ensure the commands are freed before destroying the last instance.

Syntax

struct command_context *copy_command_context(struct command_context *cmd_ctx);
Implemented in command.c:635

Arguments

cmd_ctx

The command_context that will be copied.

Return value

A new command_context with the same state as the original.

References

LocationReferrerText
command.c:635
struct command_context *copy_command_context(struct command_context *context)
command.h:371
struct command_context *copy_command_context(struct command_context *cmd_ctx);
server.c:68add_connection()
c->cmd_ctx = copy_command_context(cmd_ctx);

Call Tree

Functions calling copy_command_context()
Functions called by copy_command_context()
all items filtered out
copy_command_context()
malloc()
all items filtered out
Data read by copy_command_context()
copy_command_context()::copy_context
all items filtered out
copy_command_context()
Type of copy_command_context()
copy_command_context()
all items filtered out
Types allocated by copy_command_context()
copy_command_context()
all items filtered out